On Tue, 14 Jan 2003, Brad BARCLAY wrote:

>On Tue, 14 Jan 2003 13:31:03 -0500 (EST), [EMAIL PROTECTED] wrote:
>
>       It would be best to have something in javax.usb., but with a
>different name (perhaps USBNotActiveException).  This is for two
>reasons:
>
>       1) As some users will want to use existing stream classes with
>their open USB ports, there is the possibility for a name-space
>collision if the developer just indiscriminately imports everything
>from both java.io and javax.usb.  Thus, if they do something like...
>
>       import java.io.*;
>       import javax.usb.*;
>
>       ...
>
>       try {
>          ...bunch of USB and IO stuff that could throw one or the
>other type of NotActiveException...
>       } catch (NotActiveException e)  <-- which
>"NotActiveException" class 
>                                       are we catching here?

Yes, this is how I found out about java.io.NotActiveException...

>       Now I suppose there are two schools of thought on this -- that
>the developer should be smart enough to avoid issues like this, and can
>fix it when the compiler complains about it vs. setting things up to
>prevent problems for the slightly careless developer.  Personally, I
>lean (ever so slightly) towards the latter in this case.

Me too, I don't think anyone should have to specify the package when 
referencing a class.  Certainly there shouldn't be 
java.io.NotActiveException and javax.usb.NotActiveException.

>       2) Sun's API description for java.io.NotActiveException
>specifically states that the exception is thrown due to object
>serialization not being active and/or available.  This isn't how Java
>USB will be using it, hence it doesn't really make sense to do so.

true.

perhaps all exceptions in javax.usb should be prefixed with 'Usb'...

-- 
Dan Streetman
[EMAIL PROTECTED]
---------------------
186,272 miles per second:
It isn't just a good idea, it's the law!


-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
javax-usb-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to