You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Panic.rethrow catches the error, converts it to a raw value (discarding stack trace info) and rethrows as a panic. The Panic's stack trace points to the place where the error was rethrown. All information on where the error originated from is lost at this point.
To aid with debugging, it would be good to be able to still get the original location of the error.
Still, the rethrow location may too be useful (to see where the error re-surfaced and became a panic). So ideally we should retain both. Perhaps we could add a cause field to the panic, that could hold the original dataflow error, and ensure that when printing the stack trace we first print the frames of the rethrow location, followed by a Caused by section that prints the frames/location of the original dataflow error?
Likely to do this we may have to turn Panic.rethrow into a builtin and extend the PanicException.
The text was updated successfully, but these errors were encountered:
Currently,
Panic.rethrow
catches the error, converts it to a raw value (discarding stack trace info) and rethrows as a panic. The Panic's stack trace points to the place where the error was rethrown. All information on where the error originated from is lost at this point.To aid with debugging, it would be good to be able to still get the original location of the error.
Still, the
rethrow
location may too be useful (to see where the error re-surfaced and became a panic). So ideally we should retain both. Perhaps we could add acause
field to the panic, that could hold the original dataflow error, and ensure that when printing the stack trace we first print the frames of the rethrow location, followed by aCaused by
section that prints the frames/location of the original dataflow error?Likely to do this we may have to turn
Panic.rethrow
into a builtin and extend thePanicException
.The text was updated successfully, but these errors were encountered: