I guess we would have to define what really we would mean by "user friendly way" and then it would be just matter of getting the stacktrace via Exception#getStackTrace() and formatting each StackTraceElement in way want..
Couple of ideas that I have used (but it does depend on that definitiion of "user friendly").. 1. If you want a more meaningful exception then you could create your own Exception subclass and then query its state instead. That way you could create more meaningful traces for your context but at the cost of the exception object overhead.
2 A variant of the printStackTrace method takes a printstream parameter so you could capture output to a file etc.
Regards,<br />Dave
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop