• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use implict object exception

 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When there is some kind of exception ,then container will throw the exception in the webpage along with Stacktrace and RootCause.
So i thought i will use the attribute errorPage of Page directive and put all the StackTrace and Rootcause in a nice looking page.. However i was not able to find how to get the content.. i used getCause(), getStackTrace().getMessage()..

Please guide me

 
Ankit Garg
Sheriff
Posts: 9577
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James you can find tutorials regarding this here and here...
 
Łukasz Suchecki
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can e.getRootCause().getMessage()
BUT you have to have message in thrown exception.
So you can make:

and in error page you can get exception.getRootCause().getMessage()
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys, that was helpful.... will try it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic