JError
Error Handling Class
This class is inspired in design and concept by patErrorManager <http://www.php-tools.net>
patErrorManager contributors include:
- gERD Schaufelberger <[email protected]>
- Sebastian Mordziol <[email protected]>
- Stephan Schmidt <[email protected]>
Located in /joomla/utilities/error.php (line 61)
JError (Subpackage Utilities)
Display a custom error page and exit gracefully
- object $error: Exception object
- &$error
Method for retrieving the last exception object in the error stack
- $unset
Method to get the current error handler settings for a specified error level.
- int $level: The error level to retrieve. This can be any of PHP's own error levels, e.g. E_ALL, E_NOTICE...
Callback error handler
- Send the error object to a callback method for error handling
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Die error handler
- Echos the error message to output and then dies
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Echo error handler
- Echos the error message to output
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Ignore error handler
- Ignores the error
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Log error handler
- Logs the error message to a system log file
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Message error handler
- Enqueues the error message into the system queue
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Trigger error handler
- Triggers a PHP native error with the error message
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Verbose error handler
- Echos the error message to output as well as related info
- object $error: Exception object to handle
- array $options: Handler options
- &$error
Method to determine if a value is an exception object. This check supports both JException and PHP5 Exception objects
- mixed &$object: Object to check
Create a new JException object given the passed arguments
- int $level: The error level - use any of PHP's own error levels for this: E_ERROR, E_WARNING, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE.
- string $code: The application-internal error code for this error
- string $msg: The error message, which may also be shown the user if need be.
- mixed $info: Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN).
- $backtrace
Wrapper method for the raise() method with predefined error level of E_ERROR and backtrace set to true.
- string $code: The application-internal error code for this error
- string $msg: The error message, which may also be shown the user if need be.
- mixed $info: Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN).
Wrapper method for the raise() method with predefined error level of E_NOTICE and backtrace set to false.
- string $code: The application-internal error code for this error
- string $msg: The error message, which may also be shown the user if need be.
- mixed $info: Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN).
Wrapper method for the raise() method with predefined error level of E_WARNING and backtrace set to false.
- string $code: The application-internal error code for this error
- string $msg: The error message, which may also be shown the user if need be.
- mixed $info: Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN).
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
- int $level: Error level to register
- string $name: Human readable name for the error level
- string $handler: Error handler to set for the new error level [optional]
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
- trigger
- callback
- 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
- int $level: The error level for which to set the error handling
- string $mode: The mode to use for the error handling.
- mixed $options: Optional: Any options needed for the given mode.
Translate an error level integer to a human readable string e.g. E_ERROR will be translated to 'Error'
- int $level: Error level to translate
Documentation generated on Mon, 05 Mar 2007 20:57:47 +0000 by phpDocumentor 1.3.1