add some error handling to have full stacktrace

This commit is contained in:
odain
2024-09-11 15:36:50 +02:00
parent 1e319f3943
commit b35ffb0fe9

View File

@@ -27,7 +27,11 @@ require_once(APPROOT.'core/metamodel.class.php');
IssueLog::Trace('----- Request: '.utils::GetRequestUri(), LogChannels::WEB_REQUEST);
utils::InitTimeZone();
set_error_handler(function ($errno, $errstr) {
$e = new \Exception("");
\SetupLog::Error("Catching", null, [$e->getMessage(), $e->getTraceAsString()]);
echo $e->getMessage() . '<BR>' .$e->getTraceAsString();
}, E_WARNING);
/**
* @param string $sPagePath full path (if symlink, it will be resolved)