• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt regarding servlet exception handling .

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an exception occurs inside a catch block as shown :



Thanks in advance
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34851
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems faster to try it than ask on the web. But I didn't remember off the top of my head so I tried it.


outputs:
Exception in thread "main" java.lang.RuntimeException
at play.PlayTest.main(PlayTest.java:10)
a


So yes, the finally is executed and it is output last.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky ,

I want to know when a browser page is shown due to an exception , how the control goes back ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic