Skip to content

Commit c1a75d8

Browse files
committed
Added a short paragraph about the Exception / Throwable relation
1 parent e49f949 commit c1a75d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,11 @@ $promise = React\Promise\reject(\Throwable $reason);
395395

396396
Creates a rejected promise for the supplied `$reason`.
397397

398+
Note, that the [`\Throwable`](https://www.php.net/manual/en/class.throwable.php) interface was introduced in PHP 7
399+
covers both user [`\Exception`](https://www.php.net/manual/en/class.exception.php)'s and
400+
[`\Error`](https://www.php.net/manual/en/class.error.php) internal PHP errors. By enforcing `\Throwable` as reason to
401+
reject a promise any language error or user land exception can be used to reject a promise.
402+
398403
#### all()
399404

400405
```php

0 commit comments

Comments
 (0)