Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\ErrorReportingException Class Reference

An exception thrown whenever PHP raises a notice, warning, etc. More...

+ Inheritance diagram for Erebot\ErrorReportingException:

Public Member Functions

 __construct ($message, $code, $filename, $lineno)
 
 __toString ()
 

Static Protected Attributes

static $map = null
 A mapping of PHP's error levels' names to their numeric value.
 

Detailed Description

An exception thrown whenever PHP raises a notice, warning, etc.

This is an implementation of a custom exception which turns all PHP messages (errors, warnings, notices, etc.) into exceptions. We use this exception instead of PHP's ErrorException because the latter is buggy under PHP 5.2, which might be a target version for Erebot at some time. Original implementation proposed by luke at cywh dot com: http://php.net/manual/en/class.errorexception.php#89132

Definition at line 35 of file ErrorReportingException.php.

Constructor & Destructor Documentation

Erebot\ErrorReportingException::__construct (   $message,
  $code,
  $filename,
  $lineno 
)

Constructs a new exception from a PHP error/warning/notice.

Parameters
string$messageThe error/warning/notice message.
int$codeA code indicating whether this exception was created from an error, a warning or a notice.
string$filenameThe file that raised the error/warning/notice.
int$linenoLine number in $filename where the error/warning/notice was issued.

Definition at line 57 of file ErrorReportingException.php.

Member Function Documentation

Erebot\ErrorReportingException::__toString ( )

Returns a textual representation of this exception.

Return values
stringTextual representation of the exception.

Definition at line 89 of file ErrorReportingException.php.


The documentation for this class was generated from the following file: