RaiseError
From KnowledgeTree Document Management Made Simple
Since PHP doesn't have builtin exceptions, we use the PEAR library's exception classes to handle that aspect of the system. Any return result should be checked to see if its an exception, using
$res = <function call>
if (PEAR::isError($res)) {
// handle the error.
}
Often its enough to propogate the error to the calling method (e.g. return $res;).
del.icio.us
reddit

