A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Custom Exception doubt
Joined: Aug 08, 2009
Sep 14, 2011 12:38:04
can i create a custom exception extending
? if yes then why we do it using Exception or
. what will be the problem if we do it using Throwable always?
thanks a lot in advance
Joined: Oct 13, 2005
Sep 14, 2011 13:15:28
Because many methods only deal with Exceptions, you will have to introduce special handling for your Throwable subclass. It will count as "checked" of course.
Of course you can subclass Throwable, but that should only be done under the justification of
I only wanted to see what happens if . . .
I agree. Here's the link:
subject: Custom Exception doubt
How to throw custom exceptions while implementing Provider
custom DataSource and SourceStream for RTP
Calssic Vs Simple Custom tags
Exception Handling in Tomcat
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014