This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Custom Exception 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 "Custom Exception" Watch "Custom Exception" New topic
Author

Custom Exception

priyanaka jaiswal
Ranch Hand

Joined: Jun 03, 2011
Posts: 79
Hi All,

Can we write our own custom Exception by extending RuntimeException?
N Sahni
Ranch Hand

Joined: Jul 07, 2011
Posts: 55

Yes we can extend RuntimeException and build our own custom exception.

For more details you can refer: http://www.coderanch.com/t/376608/java/java/Why-extend-RuntimeException


Thanks and Regards,
Nilesh Sahni | nsahni@infocepts.com | www.infocepts.com
Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146

Hi,

yes can write the custom exception by extending RuntimeException as well as Exception.

Thanks.


The important thing is not to stop questioning.Curiosity has its own reason for existing.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Custom Exception
 
Similar Threads
Exception Handling in Tomcat
Thread Design Issue
wrong exception in JSP page
inputFileUpload - uploadMaxFileSize
exception in j2me