JError

From Joomla! Documentation

Jump to: navigation, search

JError is inspired in design and concept by patErrorManager [1]. It is the Joomla's Error Handling Class, and should be used by third party developers to handle errors.

Contents

Availability

Joomla 1.5 Joomla 1.6

Defined in

/joomla/error/error.php

Methods

Method name Description
attachHandler Method that attaches the error handler to JError
customErrorHandler Method that defines a custom Error Handler
customErrorPage Display a custom error page and exit gracefully
detachHandler Method that dettaches the error handler from JError
getError Method for retrieving the last exception object in the error stack
getErrorHandling Method to get the current error handler settings for a specified error level.
getErrors Method for retrieving the exception stack
handleCallback Callback error handler
handleDie Die error handler
handleEcho Echo error handler
handleIgnore Ignore error handler
handleLog Log error handler
handleMessage Message error handler
handleVerbose Verbose error handler
isError Method to determine if a value is an exception object. This check supports both JException and PHP5 Exception objects
raise Create a new JException object given the passed arguments
raiseError Wrapper method for the raise() method with predefined error level of E_ERROR and backtrace set to true.
raiseNotice Wrapper method for the raise() method with predefined error level of E_NOTICE and backtrace set to false.
raiseWarning Wrapper method for the raise() method with predefined error level of E_WARNING and backtrace set to false.
registerErrorLevel Method to register a new error level for handling errors
setErrorHandling Method to set the way the JError will handle different error levels. Use this if you want to override the default settings.
translateErrorLevel Translate an error level integer to a human readable string e.g. E_ERROR will be translated to 'Error'

Importing

jimport( 'joomla.error.error' );

See also

Personal tools