Example #1
0
/**
 * 实际的异常处理函数
 * @param  Exception $e 异常对象
 * @return void    
 */
function exceptionHandler($e)
{
    if ($e instanceof MY_Exception) {
        showException($e->getMessage(), $e->getRedirectUri(), $e->getRedirectTime(), $e->getHeading(), $e->getStatusCode());
    } else {
        if ($e instanceof HTTPException) {
            showException($e->getMessage(), null, null, 'HTTP Error', $e->getCode());
        } else {
            showException($e->getMessage());
        }
    }
}