aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Custom Exception
 
Similar Threads
Thread Design Issue
inputFileUpload - uploadMaxFileSize
Exception Handling in Tomcat
wrong exception in JSP page
exception in j2me