Skip to content

Commit

Permalink
Compat annotations for #28878 (exception stacks).
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Dec 4, 2018
1 parent 0643b31 commit c91b6da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ false.
Explicitly passing `task` will return the current exception stack on an
arbitrary task. This is useful for inspecting tasks which have failed due to
uncaught exceptions.
!!! compat "Julia 1.1"
This function requires at least Julia 1.1.
"""
function catch_stack(task=current_task(); include_bt=true)
raw = ccall(:jl_get_excstack, Any, (Any,Cint,Cint), task, include_bt, typemax(Cint))
Expand Down
3 changes: 3 additions & 0 deletions doc/src/devdocs/ast.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ These symbols appear in the `head` field of `Expr`s in lowered form.
Pop the stack of current exceptions back to the state at the associated `enter` when leaving a
catch block. `args[1]` contains the token from the associated `enter`.

!!! compat "Julia 1.1"
`pop_exception` is new in Julia 1.1.

* `inbounds`

Controls turning bounds checks on or off. A stack is maintained; if the first argument of this
Expand Down
3 changes: 3 additions & 0 deletions doc/src/manual/stacktraces.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ ERROR: Whoops!

## Exception stacks and [`catch_stack`](@ref)

!!! compat "Julia 1.1"
Exception stacks requires at least Julia 1.1.

While handling an exception further exceptions may be thrown. It can be useful to inspect all these exceptions to
identify the root cause of a problem. The julia runtime supports this by pushing each exception onto an internal
*exception stack* as it occurs. When the code exits a `catch` normally, any exceptions which were pushed onto the stack
Expand Down

0 comments on commit c91b6da

Please sign in to comment.