mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
#659 exception handling producing notices, hence causing confusion
SVN:trunk[2625]
This commit is contained in:
@@ -79,6 +79,7 @@ function FatalErrorCatcher($sOutput)
|
||||
if ( preg_match('|<phpfatalerror>.*</phpfatalerror>|s', $sOutput, $aMatches) )
|
||||
{
|
||||
header("HTTP/1.0 500 Internal server error.");
|
||||
$errors = '';
|
||||
foreach ($aMatches as $sMatch)
|
||||
{
|
||||
$errors .= strip_tags($sMatch)."\n";
|
||||
|
||||
@@ -375,11 +375,17 @@ class ApplicationInstaller
|
||||
|
||||
SetupPage::log_error('An exception occurred: '.$e->getMessage().' at line '.$e->getLine().' in file '.$e->getFile());
|
||||
$idx = 0;
|
||||
// Log the call stack, but log the parameters since they may contain passwords or other sensitive data
|
||||
// Log the call stack, but not the parameters since they may contain passwords or other sensitive data
|
||||
SetupPage::log("Call stack:");
|
||||
foreach($e->getTrace() as $aTrace)
|
||||
{
|
||||
SetupPage::log("#$idx {$aTrace['file']}({$aTrace['line']}): {$aTrace['function']}(...)");
|
||||
$sLine = empty($aTrace['line']) ? "" : $aTrace['line'];
|
||||
$sFile = empty($aTrace['file']) ? "" : $aTrace['file'];
|
||||
$sClass = empty($aTrace['class']) ? "" : $aTrace['class'];
|
||||
$sType = empty($aTrace['type']) ? "" : $aTrace['type'];
|
||||
$sFunction = empty($aTrace['function']) ? "" : $aTrace['function'];
|
||||
$sVerb = empty($sClass) ? $sFunction : "$sClass{$sType}$sFunction";
|
||||
SetupPage::log("#$idx $sFile($sLine): $sVerb(...)");
|
||||
$idx++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user