[php]<?php
/**
* MyBB 1.6
* Copyright 2010 MyBB Group, All Rights Reserved
*
* Website:
http://mybb.com
* License:
http://mybb.com/about/license
*
* $Id: class_error.php 5027 2010-06-16 04:22:21Z RyanGordon $
*/
// Set to 1 if recieving a blank page (template failure).
define("MANUAL_WARNINGS", 0);
// Define Custom MyBB error handler constants with a value not used by php's error handler.
define("MYBB_SQL", 20);
define("MYBB_TEMPLATE", 30);
define("MYBB_GENERAL", 40);
define("MYBB_NOT_INSTALLED", 41);
define("MYBB_NOT_UPGRADED", 42);
define("MYBB_INSTALL_DIR_EXISTS", 43);
define("MYBB_SQL_LOAD_ERROR", 44);
define("MYBB_CACHE_NO_WRITE", 45);
define("MYBB_CACHEHANDLER_LOAD_ERROR", 46);
if(!defined("E_STRICT"))
{
// This constant has been defined since PHP 5.
define("E_STRICT", 2048);
}
if(!defined("E_RECOVERABLE_ERROR"))
{
// This constant has been defined since PHP 5.2.
define("E_RECOVERABLE_ERROR", 4096);
}
if(!defined("E_DEPRECATED"))
{
// This constant has been defined since PHP 5.3.
define("E_DEPRECATED", 8192);
}
class errorHandler {
/**
* Array of all of the error types
*
* @var array
*/
public $error_types = array(
E_ERROR => 'Error',
E_WARNING => 'Warning',
E_PARSE => 'Parsing Error',
E_NOTICE => 'Notice',
E_CORE_ERROR => 'Core Error',
E_CORE_WARNING => 'Core Warning',
E_COMPILE_ERROR => 'Compile Error',
E_COMPILE_WARNING => 'Compile Warning',
E_DEPRECATED => 'Deprecated Warning',
E_USER_ERROR => 'User Error',
E_USER_WARNING => 'User Warning',
E_USER_NOTICE => 'User Notice',
E_STRICT => 'Runtime Notice',
E_RECOVERABLE_ERROR => 'Catchable Fatal Error',
MYBB_SQL => 'MyBB SQL Error',
MYBB_TEMPLATE => 'MyBB Template Error',
MYBB_GENERAL => 'MyBB Error',
MYBB_NOT_INSTALLED => 'MyBB Error',
MYBB_NOT_UPGRADED => 'MyBB Error',[/php