Public Member Functions | Static Public Member Functions | Protected Attributes

Error Class Reference

List of all members.

Public Member Functions

 __construct ($message= 'Generic Habari Error', $code=0, $is_error=false)
 humane_error ()
 out ()
 get ()

Static Public Member Functions

static handle_errors ()
static shutdown_handler ()
static exception_handler ($exception)
static error_handler ($errno, $errstr, $errfile, $errline, $errcontext)
static raise ($error_message, $severity=E_USER_ERROR)
static is_error ($obj)

Protected Attributes

 $message = ''
 $is_error = false

Detailed Description

Contains error-related functions and Habari's error handler.

Definition at line 12 of file error.php.

Constructor & Destructor Documentation

Error::__construct ( message = 'Generic Habari Error',
code = 0,
is_error = false 

Constructor for the Error class

string $message Exception to display
integer $code Code of the exception
boolean $is_error true if the exception represents an error handled by the Error class

Definition at line 24 of file error.php.

Member Function Documentation

static Error::error_handler ( errno,
) [static]

Used to handle all PHP errors after Error::handle_errors() is called.

Definition at line 101 of file error.php.

static Error::exception_handler ( exception  )  [static]

Used to handle all uncaught exceptions.

Definition at line 55 of file error.php.

Error::get (  ) 

function get

Returns the error message in plain text

Definition at line 273 of file error.php.

static Error::handle_errors (  )  [static]

function handle_errors

Configures the Error class to handle all errors.

Definition at line 35 of file error.php.

Error::humane_error (  ) 

Get the error text, file, and line number from the backtrace, which is more accurate

string The contructed error string

Definition at line 87 of file error.php.

Referenced by UserThemeHandler::act(), and UserThemeHandler::display().

static Error::is_error ( obj  )  [static]

function is_error

Returns true if the argument is an Error instance

Definition at line 293 of file error.php.

Referenced by __construct(), Options::__set(), InfoRecords::commit(), InfoRecords::delete_all(), and Flickr::upload().

Error::out (  ) 

function out

Outputs the error message in plain text

Definition at line 258 of file error.php.

static Error::raise ( error_message,
severity = E_USER_ERROR 
) [static]

function raise

Convenience method to create and return a new Error object

Definition at line 283 of file error.php.

Referenced by RPCClient::__construct(), Utils::crypt(), ColorUtils::hex_rgb(), Site::script_name(), Utils::ssha(), and Utils::ssha512().

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