Skip to content

Commit

Permalink
Added a short paragraph about the Exception / Throwable relation
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Oct 6, 2019
1 parent e49f949 commit a747ad4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@ $promise = React\Promise\reject(\Throwable $reason);

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

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

#### all()

```php
Expand Down

0 comments on commit a747ad4

Please sign in to comment.