Skip to content

Commit

Permalink
fix current_exceptions docstring and annotate arguments (#41897)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Aug 16, 2021
1 parent b40ae6b commit 398d1a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct ExceptionStack <: AbstractArray{Any,1}
end

"""
current_exceptions(task=current_task(); [inclue_bt=true])
current_exceptions(task::Task=current_task(); [backtrace::Bool=true])
Get the stack of exceptions currently being handled. For nested catch blocks
there may be more than one current exception in which case the most recently
Expand All @@ -145,7 +145,7 @@ uncaught exceptions.
This function went by the experiemental name `catch_stack()` in Julia
1.1–1.6, and had a plain Vector-of-tuples as a return type.
"""
function current_exceptions(task=current_task(); backtrace=true)
function current_exceptions(task::Task=current_task(); backtrace::Bool=true)
raw = ccall(:jl_get_excstack, Any, (Any,Cint,Cint), task, backtrace, typemax(Cint))::Vector{Any}
formatted = Any[]
stride = backtrace ? 3 : 1
Expand Down

0 comments on commit 398d1a0

Please sign in to comment.