[dev] Another fetchmail patch...
Jan Schneider
jan@horde.org
Tue, 4 Jun 2002 16:36:33 +0200
Zitat von Nuno Loureiro <nuno@co.eth.pt>:
> On Tue, 2002-06-04 at 14:36, Chuck Hagenbuch wrote:
>
> > I'm rather hesitant to apply this; what errors make this necessary?
> Seems
> > pretty ugly - you can't at least turn them into PEAR_Errors or
> something?
> > And you'd catch everything with this, and ignore a bunch of it, making
> > finding coding errors pretty much impossible...
>
> This is because FetchSrv::remoteMboxExists().
>
> If the remote mailbox doesn't exist c-client outputs a warning (Warning:
> Invalid mailbox (errflg=2) in Unknown on line 0).
>
> Jan tryed to silente that with OP_SILENT, but you removed because there
> were some problems...
>
> Maybe put that error handling code in that function only?
I gave you the hint to try the error handler so I should tell you the whole
story. ;-)
Try something like this:
set_error_handler('error_handler');
// code that might fail
restore_error_handler();
Almost a try-catch-block. ;-)
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft