[jcifs] SmbException Supercedes boolean?
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Tue Oct 30 11:55:44 EST 2001
> -----Original Message-----
> From: Rob Wygand [SMTP:rob at wygand.com]
> > I personally don't want to have to be forced write a hell of a lot of
> > ugly error handling code if *my* app doesn't care.
> > Sure - if app XYZ wants that info it should be able to get it easily as
> > well ;-)
> That's what makes an error handler attractive to me. jCIFS could ship
> with a default error handler that did nothing, but users of the API
> could extend said error handler to do whatever they needed. In that way
> you'd have complete customization on a per-project basis (or maybe even
> per-operation basis).
With the exception of the AuthHandler which is essentially an
ErrorHandler for authentication related errors, the ErrorHandler would not
be suitable because by nature of the Handler mechanism the new stack
context requires coordination between the Handler and the thread that
originally made the call. I think this would get very messy. The try/catch
mechanism is perfectly suitable. Let's use the mechanism provided by the
Java language and not re-invent our own Handler/errno hybrid that would
undoubtedly confuse people.
More information about the jcifs