예제 #1
0
function default_exception_handler(Exception $e)
{
    $hookArgs = array('e' => $e);
    HookManager::callHook('NoDebugExceptionHandler', $hookArgs);
    if (Debug::getMode()) {
        echo format_exception($e, true);
    } else {
        HookManager::callHook('ExceptionHandler', $hookArgs);
    }
    exit;
}
예제 #2
0
파일: system.php 프로젝트: Welvin/stingle
function default_exception_handler(Exception $e)
{
    $hookArgs = array('e' => $e);
    HookManager::callHook('NoDebugExceptionHandler', $hookArgs);
    if (!in_array($e->getCode(), ConfigManager::getGlobalConfig()->Stingle->disabledErrors->toArray())) {
        if (Debug::getMode()) {
            echo format_exception($e, true);
        } else {
            HookManager::callHook('ExceptionHandler', $hookArgs);
        }
        exit;
    }
}