Skip to content

Commit

Permalink
add .backtrace property
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi committed Jul 5, 2024
1 parent 1bd5123 commit 664ec9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sandbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ function Base.getproperty(r::Result, name::Symbol)
return getfield(r, :_value) isa ExceptionValue
elseif name === :value
return getfield(r, :_value)[]
elseif name === :backtrace
value = getfield(r, :_value)
if value isa ExceptionValue
return value.backtrace
else
return nothing
end
else
return getfield(r, name)
end
Expand Down

0 comments on commit 664ec9c

Please sign in to comment.