X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fhandler.php;h=7a4aa53c877348dab1969a799437115eae2e75d9;hb=5b90ab389309595fde01542842169d6cbd2fc562;hp=09fc98937897af00392d8b0f9285ea81073e5d48;hpb=f97a999e0737c0007ae9c3c26dfef49f75a175ac;p=mailer.git diff --git a/inc/handler.php b/inc/handler.php index 09fc989378..7a4aa53c87 100644 --- a/inc/handler.php +++ b/inc/handler.php @@ -1,7 +1,7 @@ the main page to continue."); + // Is HTML output mode? + if (isHtmlOutputMode()) { + // Output message to user and exit + reportBug($errfile, $errline, $message); } else { - // No debug extension found, so regular output - debug_report_bug($msg); + // Log error message + logDebugMessage($errfile, $errline, $message); } } +// Init error handler +function initErrorHandler () { + enableExitOnError(FALSE); +} + +// Enable exit on error +function enableExitOnError ($enable=true) { + $GLOBALS['error_handler']['exit_on_error'] = $enable; +} + // [EOF] ?>