• 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: 9597
36
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!