ErrorHandler

pop($code, $msg = ”, $type = ‘Worn’)

4: 	function pop($code, $msg = '', $type = 'Worn') {
5: 		global $Logger;
6: 		ob_get_clean();
7: 		ob_start();
8: 		$content_for_layout = $msg;
9: 		include (DIR_PUBLIC . $code . '.phtml');
10: 		$content = ob_get_contents();
11: 		ob_end_clean();
12: 		echo $content;
13: 		$Logger->error(preg_replace('/'.$type.':/','',strip_tags($msg)),$type);
14: 		exit;
15: 	}

File: lib/support/ErrorHandler.php, #line 4

errorHandler($errno, $errmsg, $filename, $linenum, $vars)

23: function errorHandler($errno, $errmsg, $filename, $linenum, $vars) {
24: 	global $_colors;
30: 	$errortype = array (
31: 		E_ERROR => 'Error',
32: 		E_WARNING => 'Warning',
33: 		E_PARSE => 'Parsing Error',
34: 		E_NOTICE => 'Notice',
35: 		E_CORE_ERROR => 'Core Error',
36: 		E_CORE_WARNING => 'Core Warning',
37: 		E_COMPILE_ERROR => 'Compile Error',
38: 		E_COMPILE_WARNING => 'Compile Warning',
39: 		E_USER_ERROR => 'User Error',
40: 		E_USER_WARNING => 'User Warning',
41: 		E_USER_NOTICE => 'User Notice',
42: 		E_STRICT => 'Runtime Notice',
43: 		E_RECOVERABLE_ERROR => 'Catchable Fatal Error'
44: 	);
45:
46:
48: 	$ignore_errors = array (
49: 		E_STRICT
50: 	);
51:
52: 	if (!in_array($errno, $ignore_errors)) {
54: 		$display_err = "" . $errortype[$errno] . ": " . $errmsg . " in " . $filename . " on line " . $linenum;
55:
57: 		ErrorHandler :: pop('500', $display_err . "

n",$errortype[$errno]); 58: } 59: }

File: lib/support/ErrorHandler.php, #line 23

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>