3 |
// $Id$ |
// $Id$ |
4 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
5 |
// $Log$ |
// $Log$ |
6 |
|
// Revision 1.3 2002/12/13 09:19:32 joko |
7 |
|
// + debugging |
8 |
|
// |
9 |
|
// Revision 1.2 2002/12/01 04:47:19 joko |
10 |
|
// + comments |
11 |
|
// |
12 |
// Revision 1.1 2002/11/12 05:42:30 joko |
// Revision 1.1 2002/11/12 05:42:30 joko |
13 |
// + initial checkin |
// + initial checkin |
14 |
// |
// |
15 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
16 |
|
|
17 |
|
|
18 |
|
// TODO: maybe use and/or enhance ErrorHandler from http://phpclasses.php-start.de/browse.html/package/345.html |
19 |
|
|
20 |
function error_handler($level, $message, $file, $line, $context) { |
function error_handler($level, $message, $file, $line, $context) { |
21 |
global $Application_Error; |
global $Application_Error; |
22 |
$Application_Error['this']->callErrorHandler($level, $message, $file, $line, $context); |
$Application_Error['this']->callErrorHandler($level, $message, $file, $line, $context); |
31 |
|
|
32 |
function activate($level = E_ALL) { |
function activate($level = E_ALL) { |
33 |
//return; |
//return; |
34 |
|
//print "1<br>"; |
35 |
|
//exit; |
36 |
global $Application_Error; |
global $Application_Error; |
37 |
|
//print "2<br>"; |
38 |
$Application_Error[this] = $this; |
$Application_Error[this] = $this; |
39 |
|
//print "3<br>"; |
40 |
//error_reporting($level); |
//error_reporting($level); |
41 |
error_reporting(E_ALL); |
error_reporting(E_ALL); |
42 |
|
//print "4<br>"; |
43 |
set_error_handler('error_handler'); |
set_error_handler('error_handler'); |
44 |
|
//print "5<br>"; |
45 |
} |
} |
46 |
|
|
47 |
function callErrorHandler($level, $message, $file, $line, $context) { |
function callErrorHandler($level, $message, $file, $line, $context) { |