wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes About using Application Exceptions in a Project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About using Application Exceptions in a Project" Watch "About using Application Exceptions in a Project" New topic
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: 37936
    
  22
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.
 
Don't get me started about those stupid light bulbs.
 
subject: About using Application Exceptions in a Project
 
Similar Threads
Exception and Throwable
Overridden method is throwing 2 or more unchecked exceptions How about the overidden method exceptns
Exceptions Query
Exception wraping
error page for runtime exceptions