Okay, that's stupid. A better solution is to log all that crap, and give the user a more friendly (if not helpful) message. For example, "We are unable to process your request due to an internal system problem. We saved some information about the error, but if you'd like to contact us with more, use the error reference BLAH-BLAH-BLAH." where the reference is some unique per-incident id that got logged along with the error information. If you actually want them to contact you (AOT just wanting to make nice), the "contact us" part can be a link.
Dumping the actual technical details to the user is a total waste of time and users' brain cells. Those are in short supply.