Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Exception

 
priyanaka jaiswal
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can we write our own custom Exception by extending RuntimeException?
 
N Sahni
Ranch Hand
Posts: 55
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vijay Tidake
Ranch Hand
Posts: 148
Hibernate Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic