ILIAS
Release_5_0_x_branch Revision 61816
|
Error Handling & global info handling uses PEAR error class. More...
Public Member Functions | |
ilErrorHandling () | |
Constructor public. | |
getLastError () | |
errorHandler ($a_error_obj) | |
defines what has to happen in case of error private | |
getMessage () | |
setMessage ($a_message) | |
appendMessage ($a_message) | |
handleUncaughtException (Exception $e) | |
Called for each uncaught exception. | |
handleRuntimeErrors ($a_error_code, $a_error_message, $a_error_file, $a_error_line) | |
We should enhance the error reporting in future releases (funding required). | |
Public Member Functions inherited from PEAR | |
PEAR ($error_class=null) | |
Constructor. | |
_PEAR () | |
Destructor (the emulated type of...). | |
& | getStaticProperty ($class, $var) |
If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. | |
registerShutdownFunc ($func, $args=array()) | |
Use this function to register a shutdown method for static classes. | |
isError ($data, $code=null) | |
Tell whether a value is a PEAR error. | |
setErrorHandling ($mode=null, $options=null) | |
Sets how errors generated by this object should be handled. | |
expectError ($code= '*') | |
This method is used to tell which errors you expect to get. | |
popExpect () | |
This method pops one element off the expected error codes stack. | |
_checkDelExpect ($error_code) | |
This method checks unsets an error code if available. | |
delExpect ($error_code) | |
This method deletes all occurences of the specified element from the expected error codes stack. | |
& | raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false) |
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. | |
& | throwError ($message=null, $code=null, $userinfo=null) |
Simpler form of raiseError with fewer options. | |
staticPushErrorHandling ($mode, $options=null) | |
staticPopErrorHandling () | |
pushErrorHandling ($mode, $options=null) | |
Push a new error handler on top of the error handler options stack. | |
popErrorHandling () | |
Pop the last error handler used. | |
loadExtension ($ext) | |
OS independant PHP extension load. |
Static Public Member Functions | |
static | _ilErrorWriter ($errno, $errstr, $errfile, $errline) |
This is used in Soap calls to write PHP error in ILIAS Logfile Not used yet!!! |
Data Fields | |
$DEBUG_ENV | |
$FATAL | |
$WARNING | |
$MESSAGE | |
Data Fields inherited from PEAR | |
$_debug = false | |
$_default_error_mode = null | |
$_default_error_options = null | |
$_default_error_handler = '' | |
$_error_class = 'PEAR_Error' | |
$_expected_errors = array() |
Protected Member Functions | |
formatBacktraceArray (array $a_backtrace) | |
translateErrorCode ($error_code) | |
Translates an integer error code to the corresponding error string. |
Error Handling & global info handling uses PEAR error class.
Definition at line 18 of file class.ilErrorHandling.php.
|
static |
This is used in Soap calls to write PHP error in ILIAS Logfile Not used yet!!!
public
Definition at line 237 of file class.ilErrorHandling.php.
ilErrorHandling::appendMessage | ( | $a_message | ) |
Definition at line 219 of file class.ilErrorHandling.php.
References getMessage().
ilErrorHandling::errorHandler | ( | $a_error_obj | ) |
defines what has to happen in case of error private
object | Error |
Definition at line 85 of file class.ilErrorHandling.php.
References $_POST, $_SESSION, $FATAL, $log, $MESSAGE, $WARNING, exit, and ilUtil\redirect().
|
protected |
array | $a_backtrace |
Definition at line 310 of file class.ilErrorHandling.php.
Referenced by handleRuntimeErrors().
ilErrorHandling::getLastError | ( | ) |
Definition at line 75 of file class.ilErrorHandling.php.
ilErrorHandling::getMessage | ( | ) |
Definition at line 211 of file class.ilErrorHandling.php.
Referenced by appendMessage().
ilErrorHandling::handleRuntimeErrors | ( | $a_error_code, | |
$a_error_message, | |||
$a_error_file, | |||
$a_error_line | |||
) |
We should enhance the error reporting in future releases (funding required).
Idea: We should convert php errors to exceptions and tweak the exception handling (already enhanced by smeyer in former releases) We should implement handlers depending on the context (web/html, soap/xml, rest/json, cli/plain text, ...)
int | $a_error_code | |
string | $a_error_message | |
string | $a_error_file | |
int | $a_error_line |
Definition at line 282 of file class.ilErrorHandling.php.
References formatBacktraceArray(), ilRuntime\getInstance(), and translateErrorCode().
ilErrorHandling::handleUncaughtException | ( | Exception | $e | ) |
Called for each uncaught exception.
Exception | $e |
Definition at line 260 of file class.ilErrorHandling.php.
References PEAR\raiseError().
ilErrorHandling::ilErrorHandling | ( | ) |
Constructor public.
Definition at line 52 of file class.ilErrorHandling.php.
References ilRuntime\getInstance(), and PEAR\PEAR().
ilErrorHandling::setMessage | ( | $a_message | ) |
Definition at line 215 of file class.ilErrorHandling.php.
|
protected |
Translates an integer error code to the corresponding error string.
int | $error_code |
Definition at line 336 of file class.ilErrorHandling.php.
Referenced by handleRuntimeErrors().
ilErrorHandling::$DEBUG_ENV |
Definition at line 25 of file class.ilErrorHandling.php.
ilErrorHandling::$FATAL |
Definition at line 32 of file class.ilErrorHandling.php.
Referenced by errorHandler().
ilErrorHandling::$MESSAGE |
Definition at line 46 of file class.ilErrorHandling.php.
Referenced by errorHandler().
ilErrorHandling::$WARNING |
Definition at line 39 of file class.ilErrorHandling.php.
Referenced by errorHandler().