summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class5
1 files changed, 4 insertions, 1 deletions
diff --git a/it.class b/it.class
index 7ef1d28..74c9b7c 100644
--- a/it.class
+++ b/it.class
@@ -155,12 +155,15 @@ static function timerlog($label = '')
* |graceperiod|timewindow|------>
* id x x x m x x x x
*/
-static function error($p = array())
+static function error($p = array(), $extra = null)
{
$p = $origp = (array)$p;
$p['title'] = $p[0] ?: $p['title']; # handle 'it_error' => "oops" that was cast to array on the way
$p['title'] = grapheme_substr($p['title'], 0, 2000);
+ if ($extra)
+ it::error('extraneous params passed to it::error');
+
foreach (array_slice(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10), 1) as $level)
if ($level["class"] . $level["type"] . $level["function"] == "it::error")
return null; # prevent recursion