<?php
/* Exception handler
*
* INPUT: error object
* OUTPUT: -
* ERROR: -
*/
function exception_handler($error) {
print "Caught exception '".$error->getmessage()."'<br />\n";
}
/* Error handler
*
* INPUT: int error number, string error string, string filename, int line number
* OUTPUT: -
* ERROR: -
*/
function error_handler($errno, $errstr, $errfile, $errline) {
print $errstr." in ".$errfile." on line ".$errline.".<br />\n";
}
error_reporting(E_ALL & ~E_NOTICE);
set_exception_handler("exception_handler");
set_error_handler("error_handler", E_ALL & ~E_NOTICE);
?>