[dev] imp's blacklist error handling

amith at xalan.com amith at xalan.com
Fri Apr 25 11:01:29 PDT 2003


Quoting John Morrissey <jwm at horde.net>:

| I noticed that imp's blacklist/whitelist code doesn't display errors
| returned by sam's API functions. I searched the list archives and found some
| previous work by Amith <amith at xalan.com>:

As I mentioned to John, I lost some of this work when my computer crashed.

| Chuck suggested that he use the userinfo argument to PEAR::raiseError() to
| return which addresses failed/succeeded. Jan suggested he pass a PEAR_Error
| into the Notification framework.

Based on what Chuck and Jan mentioned its fairly straight forward.  However be
aware that when stuffing your info into PEAR_Error, PEAR_Error actually
modifies some of the values internally (one of the variables PEAR_Error
actually prepends a string to it).

Also to clarify, Jan did not mention using the Notification framework to pass
PEAR objects.  Instead you should use Notification classes such as
Horde.success Horde.warning, etc. when constructing your messages

I never really followed up on this because for some reason it didn't feel
"right".  But I only have a limited understanding of PHP, so who am i to say? 
Good luck with the changes.

Amith



More information about the dev mailing list