reactphp / promise

Promises/A implementation for PHP.
https://reactphp.org/promise/
MIT License
2.38k stars 146 forks source link

Use \Throwable exclusively in rejection function docs #142

Closed jsor closed 5 years ago

jsor commented 5 years ago

Follow-up for #138.

jsor commented 5 years ago

Good point, i will try to rework the docs 👍 . But we must make sure to not recommend \Exception as type-declarations in callbacks. Used eg. in otherwise() callbacks, this might lead to uncaught \Error's.

clue commented 5 years ago

I concur, adding Throwable as the type hint and adding explicit docs for Exception seems to be the best solution here :+1:

WyriHaximus commented 5 years ago

@clue added a short paragraph about Throwable vs Exception.

WyriHaximus commented 5 years ago

:tada: !