patErrorManager
patErrorManager main error management class used by pat tools for the application-internal error management. Creates patError objects for any errors for precise error management.
Located in /pattemplate/patErrorManager.php (line 81)
patErrorManager
add error codes to be ingored
- mixed $codes: either an array of error code or a single code that will be ignored in future
retrieves the current error handling settings for the 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...
method for checking whether the return value of a pat application method is a pat error object.
- mixed &$object
add expected errors to stack
- mixed $codes: either an array of error code or a single code that will be ignored in future
creates a new patError object given the specified information.
- 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).
wrapper for the raise() method where you do not have to specify the error level - a patError object with error level E_ERROR will be returned.
- 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 for the raise() method where you do not have to specify the error level - a patError object with error level E_NOTICE will be returned.
- 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 for the raise() method where you do not have to specify the error level - a patError object with error level E_WARNING will be returned.
- 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).
register a new error level
This allows you to add custom error levels to the built-in
- E_NOTICE
- E_WARNING
- E_NOTICE
You could be using PHP's predefined constants for error levels or any other integer value.
- integer $level: error level
- string $name: human-readable name
setErrorClass
In order to autoload this class, the filename containing that class must be named like the class itself; with an appending ".php". Although the file must be stored in the same directory as patErrorManager.php (this file)
- string $name: classname
sets the way the patErrorManager will handle teh different error levels. Use this if you want to override the default settings.
Error handling modes:
- ignore
- trigger
- verbose
- echo
- callback
- die
- 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
returns the human-readable name for an error level, e.g. E_ERROR will be translated to 'Error'.
- integer $level: error level
Documentation generated on Mon, 05 Mar 2007 21:13:46 +0000 by phpDocumentor 1.3.1