PHP Classes
elePHPant
Icontem

File: exception.class.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Björn Puttmann  >  OoMySql  >  exception.class.php  >  Download  
File: exception.class.php
Role: Auxiliary script
Content type: text/plain
Description: helper class - exception handling
Class: OoMySql
OO MySQL interface with logging support
Author: By
Last change: removed the standard die; command when called with "fatal" type
Date: 12 years ago
Size: 656 bytes
 

Contents

Class file image Download
<?
/*#############################################
    exception class to print and log errors
    version 0.1
#############################################*/
class Exception extends Logger {
   
/* constructor
        expects: STRING filename, STRING rotation, STRING mode
        returns: VOID */
   
function Exception($path,$filename,$rotation,$mode) {
       
$this->mode = $mode;
       
$this->Logger($path,$filename,$rotation);
    }

   
/* method to print an log errors
        expects: STRING message, STRING type
        returns: VOID */
   
function throwError($message,$type) {
        if(
$this->mode == "printout")
            print
$this->_buildMessage($message);
       
$this->_log($message, $type);
    }
}
?>