• Post Reply Bookmark Topic Watch Topic
  • New Topic

Throwing exceptions other than those declared  RSS feed

 
Siddhartha Azad
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I faced this problem when trying to throw some custom exceptions from a class that derives from DefaultHandler (for SAX). I override the method startElement() of the interface ContentHandler. The prototype of this method in the interface says "....throws SAXException". But I want to throw some other exceptions from this method.
Is there a way around this?
Tx, Sid.
 
Siddhartha Azad
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never Mind. I need to derive my exception frm SAXException.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... or some unchecked exception type. Of course that opens up the whole huge debate of whether that is wise. There is no right answer, but you are as entitled to an opinion as anyone else.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!