aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes use java.lang.SecurityException or create new one Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "use java.lang.SecurityException or create new one" Watch "use java.lang.SecurityException or create new one" New topic
Author

use java.lang.SecurityException or create new one

Zee Ho
Ranch Hand

Joined: Jul 20, 2004
Posts: 128
Hi ranchers, do you implement your own SecurityException or just use the java.lang SecurityException


I think use java's is not a good idea since it is a RandomException then it became stupid for sun ask us to throw it explicitly. how about your guys?


SCJP 1.4<br />SCWCD 1.3<br />SCJD<br />SCBCD<br />IBM Xml Cert in progress
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Hi Zee,

so far I use the SecurityException from Java. But I share your doubts and am interested how the other see it.

Regards,
Darya


SCJP, SCJD, SCWCD, SCBCD
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
I created my own SecurityException class because I felt that the java.lang.SecurityException didn't really suit the needs of this application. Normally the java.lang.SE is used with a security manager (which I didn't use), and it is also a runtime exception. I wanted to force my exception to be caught, so creating my own seemed to be a better design decision to me.


“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Zee Ho
Ranch Hand

Joined: Jul 20, 2004
Posts: 128
Hi all. Thx for your replies, yes, define a SecurityException is a appropriate way to handle this. also I find a discuss about this issue

Runtime or Define new?
[ April 14, 2005: Message edited by: Zee Ho ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: use java.lang.SecurityException or create new one