catchError() public static method

Exception handling.
public static catchError ( mixed $result ) : mixed
$result mixed The result to be checked for a PEAR_Error.
return mixed Returns the original result if it was no PEAR_Error.
Example #1
0
 /**
  * Expunges messages in the current folder.
  *
  * @return mixed  True or a PEAR error in case of an error.
  */
 public function expunge($folder)
 {
     $this->select($folder);
     return Horde_Kolab_Storage_Exception_Pear::catchError($this->getBackend()->expunge());
 }