* @package TinyMVC * @version $Id$ * */ /** * Custom exception handling function * @param Exception $exception */ function tinymvc_exception_handler($exception) { if($exception instanceof Exception) { // creating TinyMVCException object manually and calling handling method $tinyMVCException = new TinyMVCException($exception->getMessage()); $tinyMVCException->handleException($exception); } } set_exception_handler('tinymvc_exception_handler');