Changeset 445 for trunk/Common/Error.php
- Timestamp:
- Oct 15, 2012, 6:41:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Error.php
r443 r445 3 3 class ErrorHandler extends Module 4 4 { 5 var $Encoding; 6 7 function __construct() 8 { 9 $this->Encoding = 'utf-8'; 10 } 11 5 12 function Init() 6 13 { … … 31 38 if(($UserErrors & $Number)) 32 39 { 33 $Error = '# '.$Date. ' : '.$Message.' on line '.$LineNumber.' in '.$FileName."\n";40 $Error = '# '.$Date."\n"; 34 41 $Backtrace = debug_backtrace(); 35 $Backtrace[0]['function'] = '';42 $Backtrace[0]['function'] = $Message; 36 43 $Backtrace[0]['args'] = ''; 37 $Backtrace[0]['file'] = '';38 $Backtrace[0]['line'] = '';44 $Backtrace[0]['file'] = $FileName; 45 $Backtrace[0]['line'] = $LineNumber; 39 46 //$First = array_shift($Backtrace); 40 //print_r($ First);47 //print_r($Backtrace); 41 48 42 49 //array_unshift($Backtrace, $First); … … 70 77 echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'."\n". 71 78 '<meta http-equiv="Content-Language" content="cs">'."\n". 72 '<meta http-equiv="Content-Type" content="text/html; charset= iso-8859-2"></head><body>'."\n".79 '<meta http-equiv="Content-Type" content="text/html; charset='.$this->Encoding.'"></head><body>'."\n". 73 80 'Došlo k vnitřní chybě!<br/> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br/><br/>'); 74 81 echo('<pre>'.$Error.'</pre><br/>'); // V případě ladění chybu i zobraz
Note:
See TracChangeset
for help on using the changeset viewer.