Implementation of an Error Management System.
Please see the docmentation for details.
Located in /code/framework/RSErrorManager/RSErrorManager.php (line 41)
Class | Description |
---|---|
RSDEngineErrorManager | RSDEngineErrorManager implements an error management for the RSDEngine. |
Constructor method.
Calls reset to clear the error stack.
Saves the error passed as argument on the error stack.
If the error does not define the property operation or if it is set to null the current operation is assigned to this property.
Returns the number of occurred errors that match the conditions passed as agrument.
This method calls getErrors. Please see getErrors for writing conditions for fetching errors from the stack.
Returns the number of occured errors that were related to the property passed as argument.
This method calls countErrors.
Returns true if errors occurred that match the conditions passed as argument.
Note that the error stack can be cleaned by calling the method reset. Please see getErrors for writing conditions for fetching errors from the stack. errorsOccurred calls countErrors.
Returns true if any errors occured on the property $property.
This method calls countErrorsByProperty.
Returns the name of the current/default operation.
Returns an Array containing all errors from the error stack that match the specified conditions.
If no conditions are specified all errors are returned from the stack. Conditions can be specified by passing an associative array with key-value-pairs. The following returns an array containing all errors that occurred on the object 't_user' and the property 'f_username' while performing the operation 'insert'.
1 $rsErrorManager->getErrors(array(
2 'object' => 't_users',
3 'property' => 'f_username',
4 'operation' => 'insert'
5 )
6 );
Returns true if the passed object is an instance of RSError.
Handle the occurence of DB errors.
This method gets called by catch.
Handle the occurence of fatal errors.
This method gets called by catch.
Handle the occurence of permission-denied errors.
This method gets called by catch.
This method is a wrapper for PEAR::raiseError. It returns an instance of the class RSError.
In comparison to PEAR::raiseError this method knows three additional parameters: $object, $propery and $operation to make it possibible to always tell where the error occured. You cannot pass the parameters $userinfo and $error_class known from PEAR::raiseError because the three additional parameters are stored in in $userinfo as an associative array and the $class_name is RSError. You would normally call this method just with the arguemnts $object, $property, $operation, $message and $code.
Report the occurence of an error.
This method is called by onFatalError and onPermissionDenied. If you want to do this method anything inherit from RSErrorManager and overwrite this method.
Removes all errors from the error stack and sets a new default operation.
Documentation generated on Mon, 8 Dec 2003 13:13:06 +0100 by phpDocumentor 1.2.3