From c91b6daee2984bfbd2a939d4adbbe287242bcf67 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 30 Nov 2018 18:43:05 +0100 Subject: [PATCH] Compat annotations for #28878 (exception stacks). --- base/error.jl | 3 +++ doc/src/devdocs/ast.md | 3 +++ doc/src/manual/stacktraces.md | 3 +++ 3 files changed, 9 insertions(+) diff --git a/base/error.jl b/base/error.jl index bd912fb743559e..488ddc68673863 100644 --- a/base/error.jl +++ b/base/error.jl @@ -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)) diff --git a/doc/src/devdocs/ast.md b/doc/src/devdocs/ast.md index 699a2b00d8d17d..a30bdd15b304e5 100644 --- a/doc/src/devdocs/ast.md +++ b/doc/src/devdocs/ast.md @@ -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 diff --git a/doc/src/manual/stacktraces.md b/doc/src/manual/stacktraces.md index a7da7a6464cd75..01a3417d33031e 100644 --- a/doc/src/manual/stacktraces.md +++ b/doc/src/manual/stacktraces.md @@ -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