• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About using Application Exceptions in a Project

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 .
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am sorry .Its a dumb question actually .
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic