Converting PHP errors into exceptions
I’ve written error handling class which divided all errors into the normal ones (notices, warnings, …), and the critical ones.
Now I’ve found out that it’s a good practice to convert all errors into exceptions. It would also shorten my code.
However, I’m not sure how to handle this…
- Are there exceptions that don’t stop scripts execution, and exceptions that do? If there aren’t…how to differ converted errors?
- Converting errors into exception is done by calling set_error_handler() and throw new ErrorException() in there…What’s next? set_exception_handler() is called automagically?
Total Views: 20 Today Views: 0














