| Author |
About using Application Exceptions in a Project
|
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
Hi ,
My appolizes if it is not the right forum .
Please let me know this :
whenever we need to define any Application Exceptions we just do like this :
For Example if there is InsufficientBalanaceException like this .
public class InsufficientBalanaceException extends Exception
{
InsufficientBalanaceException ()
{
}
}
But please let me know whether these ApplicationExceptions will be Exception or RuntimeException.
sorry if is a dumb question .
|
Save India From Corruption - Anna Hazare.
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
I am sorry .Its a dumb question actually .
|
 |
Rituraj Jain
Ranch Hand
Joined: Nov 28, 2008
Posts: 37
|
|
i think it will be a compile time exception...compiler will flag it...........why don't you subclass RuntimeException class if you want an run time exception
read this article Read It
|
Rituraj Jain
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32611
|
|
The hardest part of creating Exceptions is deciding which other class it ought to extend.
You usually need to overload the constructor when subclassing Exceptions. In 99% of occasions, you need do nothing else.
|
 |
 |
|
|
subject: About using Application Exceptions in a Project
|
|
|