No products in the cart.
Forum Replies Created
Viewing 1 post (of 1 total)
- AuthorPosts
-
lintab
ParticipantYou can add your own custom error handler, which can provide extra debug information. Furthermore, you can set it up to send you the information via email.
function ERR_HANDLER($errno, $errstr, $errfile, $errline){ $msg = "<b>Something bad happened.</b> [$errno] $errstr <br><br> <b>File:</b> $errfile <br> <b>Line:</b> $errline <br> <pre>".json_encode(debug_backtrace(), JSON_PRETTY_PRINT)."</pre> <br>"; echo $msg; return false; } function EXC_HANDLER($exception){ ERR_HANDLER(0, $exception->getMessage(), $exception->getFile(), $exception->getLine()); } function shutDownFunction() { $error = error_get_last(); if ($error["type"] == 1) { ERR_HANDLER($error["type"], $error["message"], $error["file"], $error["line"]); } } set_error_handler ("ERR_HANDLER", E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); register_shutdown_function("shutdownFunction"); set_exception_handler("EXC_HANDLER");
- AuthorPosts
Viewing 1 post (of 1 total)