summaryrefslogtreecommitdiffstats
path: root/inc/util.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/util.inc.php')
-rw-r--r--inc/util.inc.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php
new file mode 100644
index 00000000..75cd914e
--- /dev/null
+++ b/inc/util.inc.php
@@ -0,0 +1,21 @@
+<?php
+
+$verboseDebug = true;
+
+class Util
+{
+ public static function traceError($message)
+ {
+ global $verboseDebug;
+ Header('Content-Type: text/plain; charset=utf-8');
+ echo "--------------------\nFlagrant system error:\n$message\n--------------------\n\n";
+ if (isset($verboseDebug) && $verboseDebug) {
+ debug_print_backtrace();
+ echo "\n\n";
+ $vars = get_defined_vars();
+ print_r($vars);
+ }
+ exit(0);
+ }
+}
+