File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception Handling in existing application?

 
Pravin Shirke
Ranch Hand
Posts: 150
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i have an application made in struts. now i need to plugin the exception handling module into the application without using the deployment descriptor. (i.e) No declarative exception handling. now i need to create a exception handling in such a way that its effects is minimal (less code change in the existing application). how to i proceed further? any ideas...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't say what you want to *do* with exceptions, so it's hard to help. Nor do I understand why you can't use declarative exception handling. Or if there's already any declarative exception handling in place. So it's hard to help, but my first thought would be to use a filter.
 
Pravin Shirke
Ranch Hand
Posts: 150
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,
thanks for the reply.

actually what i want to do is, whenever an exception has occurred in my application(i mean anywhere and of anytype it can be of checked or unchecked type) i need to show the user the custom message. say "due to some problem the request cannot be processed and please try again." and internally i want to log the stack trace to the log file. wherein it will log the actual exception caught and at what position like line number etc. which will be helpful in debugging.



 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same answer.
 
Pravin Shirke
Ranch Hand
Posts: 150
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,
thats what i am asking how should i proceed in achieving the same. any pointers for same will do.

thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic