\JError
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>
Synopsis
class JError
{
- // methods
- public static boolean isError()
- public static mixed getError()
- public static array getErrors()
- public static void addToStack()
- public static mixed raise()
- public static reference throwError()
- public static raiseError()
- public static raiseWarning()
- public static raiseNotice()
- public static array getErrorHandling()
- public static mixed setErrorHandling()
- public static void attachHandler()
- public static void detachHandler()
- public static boolean registerErrorLevel()
- public static mixed translateErrorLevel()
- public static handleIgnore()
- public static handleEcho()
- public static handleVerbose()
- public static handleDie()
- public static handleMessage()
- public static handleLog()
- public static handleCallback()
- public static void customErrorPage()
- public static void customErrorHandler()
- public static string renderBacktrace()
Hierarchy
Extended by
Members
protected
- $handlers
—
array
Array of message handlers - $levels
—
array
Array of message levels - $stack
—
array
Array containing the error stack
public
- $legacy
—
boolean
Legacy error handling marker
Methods
public
- addToStack() — Method to add non-JError thrown JExceptions to the JError stack for debugging purposes
- attachHandler() — Method that attaches the error handler to JError
- customErrorHandler() — Display a message to the user
- customErrorPage() — Display a custom error page and exit gracefully
- detachHandler() — Method that detaches 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 - Send the error object to a callback method for error handling
- handleDie() — Die error handler - Echos the error message to output and then dies
- handleEcho() — Echo error handler - Echos the error message to output
- handleIgnore() — Ignore error handler - Ignores the error
- handleLog() — Log error handler Logs the error message to a system log file
- handleMessage() — Message error handler Enqueues the error message into the system queue
- handleVerbose() — Verbose error handler - Echos the error message to output as well as related info
- isError() — Method to determine if a value is an exception object.
- 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 {@link raise()} method with predefined error level of E_NOTICE and backtrace set to false.
- raiseWarning() — Wrapper method for the {@link 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
- renderBacktrace() — Render the backtrace
- setErrorHandling() — Method to set the way the JError will handle different error levels. Use this if you want to override the default settings.
- throwError() — Throw an error
- translateErrorLevel() — Translate an error level integer to a human readable string e.g. E_ERROR will be translated to 'Error'