Skip to content

Commit ff68124

Browse files
authored
Exception Summary: Another band-aid for missing stacktrace (#17)
* summary: another band-aid for missing stacktrace 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.
1 parent f9431b9 commit ff68124

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/exception_summary.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ function _summarize_exception(io::IO, exc, stack; prefix = nothing)
135135
# Print the source line number of the where the exception occurred.
136136
# In order to save performance, only process the backtrace up until the first printable
137137
# frame. (Julia skips frames from the C runtime when printing backtraces.)
138-
local bt
138+
# A report was received about an error where bt was not defined. Band-aid by
139+
# initializing it as an empty vector. It's not understood why there was no backtrace.
140+
bt = []
139141
for i in eachindex(stack)
140142
bt = Base.process_backtrace(stack[i:i])
141143
if !isempty(bt)

0 commit comments

Comments
 (0)