[dev] imp's blacklist error handling

amith at xalan.com amith at xalan.com
Fri Apr 25 11:34:41 PDT 2003


| (Horde.success is not a notification class ... Unless you mean something
| like 'classification'.)

yup, thats what I meant.

|
| You can do:
|
| 	$res = $this->someErrorProneAction();
| 	if (PEAR::isError($res)) {
| 		$notification->push($res, 'horde.error');
| 	}
|
| That will work -- PEAR_Error implements the getMessage() method just as
| does Notification_Event.

The problem with this (and I did this earlier) is that this is across API
methods.  You shouldn't do this over API methods as a matter of convention and
in case you wanted to use something like XML-RPC.

Amith




More information about the dev mailing list