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
Now that #28878 has been merged, let's consider how to make the most of it. Largely, that PR added the exception stack runtime and addressed several bugs in the previous system, but left aside some other possible benefits such as improved error reporting. Here's a list of follow-on features and improvements which have crossed my mind at one time or another.
Consider whether catch_stack() API types could be improved. For example, returning a custom type rather than a bare Vector would allow normal show to give something useful here rather than needing a special showerror and display_error? (Refine exception stack API #29901)
Improved error reporting in the REPL with catch_stack and Base.display_error - figure out how to display all the errors in the stack in a way which emphasizes the information most likely to help fix the problem. (Display exception stacks #30900)
Consider whether the exception nesting behavior of LoadError is the right thing. This looks like it might have quite some overlap with the exception stack system for root cause analysis, being in some ways more convenient and some ways less. (Display exception stacks #30900)
Documentation
Consider whether the manual should discourage rethrow(exc), except in special circumstances. (If the stacks print nicely enough, are there any remaining reasons to use rethrow(exc) at all?)
Runtime
Task cleanup: Remove task.backtrace which now duplicates the storage in task->excstack (is this considered a public API? If so, consider getproperty?)
Replace panic error dumping (eg, jl_static_show(JL_STDERR, jl_current_exception())) with a dump of the full exception stack.
jl_current_exception() — Asses other uses; consider whether they should be rewritten.
Expose full exception stack to embedding API rather than just previous_exception?
Teach static analyzer about rooting of the return value from jl_current_exception() if possible (and add jl_excstack_t as a tracked type). Would be helpful to have Import ClangSA.jl source tree #28838 merged first.
Now that #28878 has been merged, let's consider how to make the most of it. Largely, that PR added the exception stack runtime and addressed several bugs in the previous system, but left aside some other possible benefits such as improved error reporting. Here's a list of follow-on features and improvements which have crossed my mind at one time or another.
Base / stdlib
showerror
integration, perhaps (Display exception stacks #30900)catch_stack()
API types could be improved. For example, returning a custom type rather than a bareVector
would allow normalshow
to give something useful here rather than needing a specialshowerror
anddisplay_error
? (Refine exception stack API #29901)catch_stack
andBase.display_error
- figure out how to display all the errors in the stack in a way which emphasizes the information most likely to help fix the problem. (Display exception stacks #30900)rethrow(exc)
cleanup: this can becomerethrow()
in nearly all cases now (Replace trivial uses of rethrow(exc) with rethrow() #29794 Replace trivial uses of rethrow(exc) with rethrow() Pkg.jl#873)LoadError
is the right thing. This looks like it might have quite some overlap with the exception stack system for root cause analysis, being in some ways more convenient and some ways less. (Display exception stacks #30900)Documentation
rethrow(exc)
, except in special circumstances. (If the stacks print nicely enough, are there any remaining reasons to userethrow(exc)
at all?)Runtime
Task
cleanup: Removetask.backtrace
which now duplicates the storage intask->excstack
(is this considered a public API? If so, consider getproperty?)jl_static_show(JL_STDERR, jl_current_exception())
) with a dump of the full exception stack.jl_current_exception()
— Asses other uses; consider whether they should be rewritten.previous_exception
?jl_current_exception()
if possible (and addjl_excstack_t
as a tracked type). Would be helpful to have Import ClangSA.jl source tree #28838 merged first.@vtjnash
The text was updated successfully, but these errors were encountered: