• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

use java.lang.SecurityException or create new one

 
Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic