• Post Reply Bookmark Topic Watch Topic
  • New Topic

Defined Exception  RSS feed

 
Shafian Kisna
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I would like to know if its possible to write specific exception? For instance if I am checking a list of books from a directory, how can i throw the exception to say books not found? Is there anyway, I can write a user defined exceptions?

Pls guide

Thanks
Rgds
 
Martin Simons
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the tutorials at java.sun.com
 
Shafian Kisna
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks will look for it...

Rgds
 
Aditya Prasann
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can write user defined exceptions. User defined exceptions are those exceptions which an application provider or an API provider defines by subclassing java.lang.Throwable class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!