• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

User-defined Exception class

 
mi te
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you read the following code below?


This runs ok, but I wanted to make sure this the prefered way of writing a user-defined exception class. The question I am asking is that is it better not to override the method getMessage() of Exception class?

Please someone be kind and reply.

[ March 13, 2006: Message edited by: Mark Spritzler ]
[ March 13, 2006: Message edited by: Mark Spritzler ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks much easier to read when I put in the CODE tags, that you can put in when you click the CODE button under the Add Reply button when posting messages on this board.

Mark
 
Greg Charles
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say there's no particular reason to override getMessage(), so why do it?
 
mi te
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, to be honest why I bothered overriding.... I ought t o have a strong cup of coffee.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic