[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/error/ -> error.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: error.php 14401 2010-01-26 14:10:00Z louis $
File Size: 584 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JError:: (10 methods):
  isError()
  getErrorHandling()
  setErrorHandling()
  attachHandler()
  detachHandler()
  registerErrorLevel()
  translateErrorLevel()
  handleCallback()
  customErrorPage()
  customErrorHandler()


Class: JError  - X-Ref

Error Handling Class

This class is inspired in design and concept by patErrorManager <http://www.php-tools.net>

patErrorManager contributors include:
- gERD Schaufelberger    <gerd@php-tools.net>
- Sebastian Mordziol    <argh@php-tools.net>
- Stephan Schmidt        <scst@php-tools.net>

isError(& $object)   X-Ref
Method to determine if a value is an exception object.  This check supports both JException and PHP5 Exception objects

param: mixed    &$object    Object to check
return: boolean    True if argument is an exception, false otherwise.

getErrorHandling( $level )   X-Ref
No description

setErrorHandling($level, $mode, $options = null)   X-Ref
Method to set the way the JError will handle different error levels. Use this if you want to override the default settings.

Error handling modes:
- ignore
- echo
- verbose
- die
- message
- log
- callback

You may also set the error handling for several modes at once using PHP's bit operations.
Examples:
- E_ALL = Set the handling for all levels
- E_ERROR | E_WARNING = Set the handling for errors and warnings
- E_ALL ^ E_ERROR = Set the handling for all levels except errors

param: int        $level        The error level for which to set the error handling
param: string    $mode        The mode to use for the error handling.
param: mixed    $options    Optional: Any options needed for the given mode.
return: mixed    True on success, or a JException object if failed.

attachHandler()   X-Ref
Method that attaches the error handler to JError


detachHandler()   X-Ref
Method that dettaches the error handler from JError


registerErrorLevel( $level, $name, $handler = 'ignore' )   X-Ref
Method to register a new error level for handling errors

This allows you to add custom error levels to the built-in
- E_NOTICE
- E_WARNING
- E_NOTICE

param: int        $level        Error level to register
param: string    $name        Human readable name for the error level
param: string    $handler    Error handler to set for the new error level [optional]
return: boolean    True on success; false if the level already has been registered

translateErrorLevel( $level )   X-Ref
Translate an error level integer to a human readable string
e.g. E_ERROR will be translated to 'Error'

param: int        $level    Error level to translate
return: mixed    Human readable error level name or boolean false if it doesn't exist

handleCallback( &$error, $options )   X-Ref
No description

customErrorPage(& $error)   X-Ref
Display a custom error page and exit gracefully

param: object    $error Exception object
return: void

customErrorHandler($level, $msg)   X-Ref
No description



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1