Created
September 23, 2016 14:59
-
-
Save jgdoncel/da10ca9927b0290161551d72ac1a132c to your computer and use it in GitHub Desktop.
Error handler para convertir cualquier warning, notice etc. en una excepción
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function exception_error_handler($errno, $errstr, $errfile, $errline ) { | |
throw new ErrorException($errstr, 0, $errno, $errfile, $errline); | |
} | |
set_error_handler("exception_error_handler"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment