Look at the Seam Wicki message.xhtml there you can find an example with stack-trace.
Nicklas Karlsson wrote on Apr 09, 2008 01:36 PM:
Should the user even be bothered with such information?
User don't care, just place a message that the message/error has been sent to the administrator (or something that makes them think you'll handle it) Good logging (or logmails) is they key.
Showing detailed errors to users is also a security leak
What user want to know is what they can do next, so if a transaction fails because a 3rd party service is down place a message to try again in a few minutes, try a new transaction or well you get the picture. Just ask your mother whats she need to know not to panic, if mine sees error on screen she gets confused.