A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCM Java EE 6 Enterprise Architect Exam Guide
this week in the
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 . . .
subject: Custom Exception doubt
custom DataSource and SourceStream for RTP
Exception Handling in Tomcat
Calssic Vs Simple Custom tags
How to throw custom exceptions while implementing Provider
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014