forked from Cavemanon/cavepaintings
better asserting
This commit is contained in:
@@ -1441,6 +1441,19 @@ function get_debug_info() {
|
||||
return $debug;
|
||||
}
|
||||
|
||||
function score_assert_handler($file, $line, $code, $desc = null) {
|
||||
$file = basename($file);
|
||||
print("Assertion failed at $file:$line: $code ($desc)");
|
||||
/*
|
||||
print("<pre>");
|
||||
debug_print_backtrace();
|
||||
print("</pre>");
|
||||
*/
|
||||
}
|
||||
//assert_options(ASSERT_ACTIVE, 1);
|
||||
assert_options(ASSERT_WARNING, 0);
|
||||
assert_options(ASSERT_QUIET_EVAL, 1);
|
||||
assert_options(ASSERT_CALLBACK, 'score_assert_handler');
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* Request initialisation stuff *
|
||||
|
Reference in New Issue
Block a user