nim-chronos
nim-chronos copied to clipboard
Stack trace in `Exception.msg` gives poor UX
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.
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.