When a dictionary cannot retrieve values it shows two error types, is it making a kind of chaining or is it just inside the error message?
LoadError: KeyError: key "d" not found
When a dictionary cannot retrieve values it shows two error types, is it making a kind of chaining or is it just inside the error message?
LoadError: KeyError: key "d" not found
The LoadError
is there because the error is happening during an include
or using
(see ?LoadError
). It just prints the error that happened. Just accessing a Dict
incorrectly by itself doesn’t show LoadError
.
julia> d = Dict()
Dict{Any, Any}()
julia> d[1]
ERROR: KeyError: key 1 not found
Stacktrace:
[1] getindex(h::Dict{Any, Any}, key::Int64)
@ Base .\dict.jl:477
[2] top-level scope
@ REPL[7]:1