function exceptionHandlerForDevelopment(Exception $exception) { $bt = $exception->getTrace(); array_unshift($bt, array('line' => $exception->getLine(), 'file' => $exception->getFile())); Kurogo::log(LOG_ALERT, "A " . get_class($exception) . " has occured: " . $exception->getMessage(), "exception", $bt); $errtime = developmentErrorLog($exception); $error = print_r($exception, TRUE); if ($url = getErrorURL($exception, $errtime)) { Kurogo::redirectToURL($url); } else { header('Content-type: text/plain; charset=' . Kurogo::getCharset()); die("A serious error has occurred: \n\n" . $error); } }
/** * Exception Handler set in initialize.php */ function exceptionHandlerForDevelopment($exception) { $errtime = developmentErrorLog($exception); error_log(print_r($exception, TRUE)); header('Location: '.getErrorURL($exception, $errtime)); }