Skip to content

Commit 5ca4d00

Browse files
committed
Merge pull request #9 from async-interop/issue-7
'when' MUST NOT throw exceptions from the callable
2 parents 0e7edb1 + 6a775fd commit 5ca4d00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The `when` method MUST accept at least one argument:
6868
function($error, $value) { /* ... */ }
6969
```
7070

71-
Any implementation MUST at least provide these two parameters. The implementation MAY extend the `Awaitable` interface with additional parameters passed to the callback. Further arguments to `when` MUST have default values, so `when` can always be called with only one argument. `when` MUST NOT return a value.
71+
Any implementation MUST at least provide these two parameters. The implementation MAY extend the `Awaitable` interface with additional parameters passed to the callback. Further arguments to `when` MUST have default values, so `when` can always be called with only one argument. `when` MAY NOT return a value. `when` MUST NOT throw exceptions bubbling up from a callback invocation.
7272

7373
> **NOTE:** The signature doesn't specify a type for `$error`. This is due to the new `Throwable` interface introduced in PHP 7. As this specification is PHP 5 compatible, we can use neither `Throwable` nor `Exception`.
7474

0 commit comments

Comments
 (0)