Code has been added to clipboard!

PHP Top Level Exception Handler

Example
<?php
  function myException($exception) {
    echo "<b>Exception is </b> " . $exception->getMessage();
  }

  set_exception_handler('myException');

  throw new Exception('Uncaught Exception has been caught');
?>