Class RSError

Description

An extended version of PEAR_Error.

RSError is capable of handling the parameter $userinfo as an associative array with additional information about the error: object, property and operation. It is recommende to use the wrapper RSErrorManager::raiseRSError to raise a new RSError.

Located in /code/framework/RSErrorManager/RSError.php (line 44)

PEAR_Error
   |
   --RSError
Variable Summary
String $object
String $operation
String $property
Method Summary
RSError RSError ([mixed $message = 'unknown error'], [int $code = null], [int $mode = null], [mixed $options = null], [mixed $userinfo = null])
String. getObject ()
String. getOperation ()
String. getProperty ()
String toString ()
Variables
String $object = null (line 49)

The name of the object to which the error is related.

String $operation = null (line 59)

The name of the operation to which the error is related.

String $property = null (line 54)

The name of the property to which the error is related.

Methods
Constructor RSError (line 82)

Constructor method.

The constructor calls the parent constructor PEAR_Error with the arguments $message, $code, $mode, $options and $userinfo. Before doing so the private fields object, property and operation are set if the parameter $userinfo is an associativ array. The associative array should contain tree key-value-pairs: The key 'object' pointing to the name of the object to which the error is related. The key 'property' pointing to the name of the property to which the error is related. The key 'operation' pointing to the name of the operation to which the error is related.

RSError RSError ([mixed $message = 'unknown error'], [int $code = null], [int $mode = null], [mixed $options = null], [mixed $userinfo = null])
  • mixed $message: A text error message or a PEAR error object.
  • int $code: A numeric error code.
  • int $mode: One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE or PEAR_ERROR_CALLBACK.
  • mixed $options: If $mode is PEAR_ERROR_TRIGGER, this parameter specifies the PHP-internal error level (one of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). If $mode is PEAR_ERROR_CALLBACK, this parameter specifies the callback function or method. In other error modes this parameter is ignored.
  • mixed $userinfo: A string or an associative array defining the elements 'object', 'property' and 'operation'.
getObject (line 97)

Returns the value of the field object.

String. getObject ()
getOperation (line 117)

Returns the value of the field operation.

String. getOperation ()
getProperty (line 107)

Returns the value of the field property.

String. getProperty ()
toString (line 130)

Returns a literal representation of this error.

Overwrites the method toString inherited by PEAR_Error. Note that the return value of PEAR_Error::toString is appended.

  • see: PEAR_Error::toString
String toString ()

Documentation generated on Mon, 8 Dec 2003 13:13:04 +0100 by phpDocumentor 1.2.3