/[cvs]/nfo/php/libs/org.netfrag.flib/Application/ErrorHandler.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Application/ErrorHandler.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Tue Nov 12 05:42:30 2002 UTC revision 1.3 by joko, Fri Dec 13 09:19:32 2002 UTC
# Line 3  Line 3 
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);
# Line 23  class Application_ErrorHandler { Line 31  class Application_ErrorHandler {
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) {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed