diff options
author | Urban Müller | 2021-02-12 16:03:03 +0100 |
---|---|---|
committer | Urban Müller | 2021-02-12 16:03:03 +0100 |
commit | ca0e57eb0c65ac41ca24903e58ce0a8168eebf30 (patch) | |
tree | 489f9c312d7efa1824dceefaea18053d83db4b39 | |
parent | a35d8927af3bee4cd7b9f030bd6f6f4992eb139a (diff) | |
download | itools-ca0e57eb0c65ac41ca24903e58ce0a8168eebf30.tar.gz itools-ca0e57eb0c65ac41ca24903e58ce0a8168eebf30.tar.bz2 itools-ca0e57eb0c65ac41ca24903e58ce0a8168eebf30.zip |
allow custom stack traces from exception handler
-rw-r--r-- | it.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -192,7 +192,7 @@ static function error($p = array(), $extra = null) if (it::match('-', $p['timewindow']) && ($parts = explode("-", $p['timewindow']))) list($p['graceperiod'], $p['timewindow']) = [$parts[0], $parts[1] - $parts[0]]; $p += array('blockmailid' => $GLOBALS['ULTRASITE'] . "." . md5($p['to'])); - $trace = it_debug::backtrace(array('skiplevels' => $p['backtraceskip'], 'skipfiles' => $p['skipfiles'])); # moved in here for performance in mass error case + $trace = it_debug::backtrace(array('skiplevels' => $p['backtraceskip'], 'skipfiles' => $p['skipfiles'], 'trace' => $p['trace'])); # moved in here for performance in mass error case @mkdir("/tmp/alertdata"); @chmod("/tmp/alertdata", 0777); @@ -293,7 +293,7 @@ static function error($p = array(), $extra = null) $body = it::replace(array('(pw|passw|password\d*|secret)(\' => |\] => |=)[^&\s]*' => '$1$2********'), $body, array('utf8' => false)); } - $type = ($p['fatal'] || it::match('^\w+: Uncaught ', $p['title']) ? "Fatal: " : "Error: "); + $type = ($p['fatal'] ? "Fatal: " : "Error: "); $debugparams = it::replace(['^debug_' => ""], it::grep('^debug_(.*)', array_keys($GLOBALS))); if (!it::is_live() || array_diff($debugparams, it::match('[-\w]+', $GLOBALS['ULTRAHOME'], ['all' => true]), ["devel", "twin", "utf8check", gethostname()])) $type = mb_strtolower($type); |