Skip to content

Conversation

@kelunik
Copy link
Member

@kelunik kelunik commented Feb 4, 2017

I'm not entirely sure about that one. It prevents us from directly printing to STDERR and instead deferring to PHP to handle that. PHP will automatically choose what to do based on ini settings like display_errors.

One potential downside of this approach is people using exit inside callbacks registered with register_shutdown_function. That would result in hiding the exception.

This might happen if you run the event loop from a register_shutdown_function. RxPHP does this in its examples to reduce the boilerplate for these. In that case our exit(255); here directly exits without executing any further shutdown functions.

Feedback and opinions are very welcome.

@kelunik kelunik force-pushed the error-handler-shutdown branch from 6f567db to 60900b4 Compare February 4, 2017 22:14
@kelunik kelunik mentioned this pull request Feb 19, 2017
@kelunik
Copy link
Member Author

kelunik commented Feb 19, 2017

Closing in favor of #45.

@kelunik kelunik closed this Feb 19, 2017
@kelunik kelunik deleted the error-handler-shutdown branch February 19, 2017 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants