Exemplo n.º 1
0
/**
 * This is out execption handler
 * @param Exception $exception
 */
function toratan_exception_handler($exception)
{
    $mp = new \zinux\kernel\utilities\pipe("__ERRORS__");
    try {
        $mp->write($exception);
    } catch (\Exception $e) {
        unset($e);
        modules\defaultModule\controllers\errorController::$__EXTERN_ERROR = $exception;
    }
    # we need to use api because httpRequest will contain error(/error will set error header)
    # cannot user `header()` we because of the URI change!! we want the error URI remain same.
    @\zinux\kernel\application\api::call("/error");
    exit;
}