Created
April 16, 2019 08:37
-
-
Save MarioBlazek/594cf85d3d785d8c3c5be2de1e8c98f7 to your computer and use it in GitHub Desktop.
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 myCustomErrorHandler(int $errNo, string $errMsg, string $file, int $line) { | |
echo "Wow my custom error handler got #[$errNo] occurred in [$file] at line [$line]: [$errMsg]"; | |
} | |
set_error_handler('myCustomErrorHandler'); | |
try { | |
what; | |
} catch (Throwable $e) { | |
echo 'And my error is: ' . $e->getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment