errorData = $errorData + array('error_code' => $error_code); } /** * Custom string representation of object. * * @return string */ public function __toString() { return __CLASS__ . ": [{$this->errorData['error_code']}: {$this->message}\n"; } /** * Get error code. * * @return mixed */ public function getErrorCode() { return $this->errorData['error_code']; } /** * Return specific error information. * * (Can be used for more detailed error messages or translation.) * * This method may be overridden in child exception classes in order * to add functionality not present in PEAR_Exception and is a placeholder * to define API * * The returned array must be an associative array of parameter => value like so: *
   * array('name' => $name, 'context' => array(...))
   * 
* @return array */ public function getErrorData() { return $this->errorData; } }