[jcifs] SmbException Supercedes boolean?

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Tue Oct 30 11:36:58 EST 2001

> -----Original Message-----
> From:	Christopher R. Hertel [SMTP:crh at ubiqx.mn.org]
> My gut is also to return boolean and provide an async mechanism for
> determining the cause of the failure.  We are dealing with an object,
> which has some degree of persistence, so it should be possible to retain the
> last error code, no?
	DOS error codes (and eventually NT Status codes) are accessable from
	SmbException as defined in the Leach/Naik/SNIA document. See my
	recent example and jcifs/smb/SmbException.java

>   Instead of using a handler, you would follow a failed
> request with a call to the object requesting the error value.  The only
> problem I see with this is that it could get very messed up in a
> multi-threaded environment (which is why a handler would be useful).
	The errno approach is inferior to exception handling and we should therefore use
	it. The only difference being there is only one Exception class for all of the
	possible error conditions because there are so many possibilties (hundreds).

> I like the idea of sticking as close as possible to existing interfaces.
	This is 0.5. We're allowed to do this. I think it's a necessary change and will be
	appreciated in the long run.


More information about the jcifs mailing list