Skip to content

Commit

Permalink
summary: another band-aid for missing stacktrace
Browse files Browse the repository at this point in the history
The following error was reported:

	UndefVarError: `bt` not defined

Previously, a different error was reported where bt was a 0-length
vector. Why the stacktrace is missing is not known in either case.
  • Loading branch information
msagarpatel committed Dec 28, 2023
1 parent f9431b9 commit bd720cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/exception_summary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ function _summarize_exception(io::IO, exc, stack; prefix = nothing)
# Print the source line number of the where the exception occurred.
# In order to save performance, only process the backtrace up until the first printable
# frame. (Julia skips frames from the C runtime when printing backtraces.)
local bt
# A report was received about an error where bt was not defined. Band-aid by
# initializing it as an empty vector. It's not understood why there was no backtrace.
local bt = []

This comment has been minimized.

Copy link
@vustef

vustef Dec 28, 2023

Contributor

I think that local is not needed

This comment has been minimized.

Copy link
@msagarpatel

msagarpatel Dec 28, 2023

Author Collaborator

removed in 84c9312

for i in eachindex(stack)
bt = Base.process_backtrace(stack[i:i])
if !isempty(bt)
Expand Down

0 comments on commit bd720cf

Please sign in to comment.