/[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.2 by joko, Sun Dec 1 04:47:19 2002 UTC revision 1.4 by joko, Sun Feb 9 17:30:27 2003 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    -------------------------------------------------------------------------  //    -------------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.4  2003/02/09 17:30:27  joko
7    //    + minor update related to new log level constants
8    //
9    //    Revision 1.3  2002/12/13 09:19:32  joko
10    //    + debugging
11    //
12  //    Revision 1.2  2002/12/01 04:47:19  joko  //    Revision 1.2  2002/12/01 04:47:19  joko
13  //    + comments  //    + comments
14  //  //
# Line 28  class Application_ErrorHandler { Line 34  class Application_ErrorHandler {
34    
35    function activate($level = E_ALL) {    function activate($level = E_ALL) {
36      //return;      //return;
37    //print "1<br>";
38    //exit;
39      global $Application_Error;      global $Application_Error;
40    //print "2<br>";
41      $Application_Error[this] = $this;      $Application_Error[this] = $this;
42    //print "3<br>";
43      //error_reporting($level);      //error_reporting($level);
44      error_reporting(E_ALL);      error_reporting(E_ALL);
45    //print "4<br>";
46      set_error_handler('error_handler');      set_error_handler('error_handler');
47    //print "5<br>";
48    }    }
49    
50    function callErrorHandler($level, $message, $file, $line, $context) {    function callErrorHandler($level, $message, $file, $line, $context) {
# Line 76  The error message was: $message Line 88  The error message was: $message
88        if (isset($this->site)) {        if (isset($this->site)) {
89        
90          // logging mechanism          // logging mechanism
91          $this->site->log($phperror, LOG_ERR);          $this->site->log($phperror, PEAR_LOG_ERR);
92        
93          // redirection to "STDOUT", make html for output          // redirection to "STDOUT", make html for output
94          if ($this->site->config['mode']['PHPERRORS_LEVEL']) {          if ($this->site->config['mode']['PHPERRORS_LEVEL']) {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

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