-
-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Labels
Description
I have a code like this:
$promise->then(function() {
// ...
throw new FirstException();
})->then(null, function ($error) {
// ...
throw new SecondException();
});
SecondException()
is lost, never handled.
But say for example that I have a PHP error handler that triggers exceptions.
Say then that I am in the middle of my work on the error handling closure (the second one above).
While I code it, I make mistakes, like usual.
How am I supposed to get the SecondException to my eyes so that I can have a great debugging experience? Adding a third "robust" ->then(null, 'debugProvedHandler')
?
I'd prefer having an exception thrown from the last error handler be re-thrown, don't you?
Or any other way I'm missing?