summaryrefslogtreecommitdiffstats
path: root/inc/util.inc.php
blob: 75cd914ebfca9737c007bf2399a09c7b6cb3aec5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
	}
}