Skip to content

Instantly share code, notes, and snippets.

@JulienBreux
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JulienBreux/10776219 to your computer and use it in GitHub Desktop.
Save JulienBreux/10776219 to your computer and use it in GitHub Desktop.
PHP - Error to Exception
<?php
set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontex) {
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
});
@MarcFRICOU
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment