• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error +adding a message

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all I want to be able to add some information to my error messages. In particular what I want to be able to do is to add a tracking number so that if they contact someone asking for help with a particular issue I can go back in the logs and find what occurred with that tracking number. I was thinking of storing the value in a session variable and displaying that on the page, but I was curious if there was better more effective ways of doing this.
The errors are in cases when exceptions have been caught, such as a piece of information missing, I want to throw an exception which is dealt with in struts-config.xml.

thanks in advance for any thoughts or suggestions.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing that I have done recently is to update my applications error page to include the current date and time. They way if a user submits a screen capture we at least have a place in the logs to start.

- Brent
 
A knibbs
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Brent Sterling:
One thing that I have done recently is to update my applications error page to include the current date and time. They way if a user submits a screen capture we at least have a place in the logs to start.

- Brent


Is there a way to include dynamic information? Basically I want to be able to pass in a string that will be thrown by the exception. (The string will be modified so that the message is something that makes sense to the user.)

Is this something that is difficult to do or is it so simple that I haven't explained it well ?

Thanks again for taking the time to read my post.
It is much appreciated.
 
machines help you to do more, but experience less. Experience this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic