nim-chronos icon indicating copy to clipboard operation
nim-chronos copied to clipboard

Stack trace in `Exception.msg` gives poor UX

Open arnetheduck opened this issue 4 years ago • 1 comments

Async stack traces should not reside in the msg field of the exception - this field is meant for a short, human-readable description of the error that can be logged on a single line.

The Exception object already contains a parent field for exceptions - this, together with a dedicated FutureError exception that has a source field for the purpose would allow code that logs the exception to deliver a better UX.

arnetheduck avatar Jun 04 '20 07:06 arnetheduck

hmm interesting, you are proposing to create a FutureError object, that has file/line info or stacktrace even, and assign this object parent field with the actual exception that really happened? That's actually the easiest and also a quite good solution.

sinkingsugar avatar Jun 04 '20 14:06 sinkingsugar