I’m having some issues with throw
not calling showerror
on custom exceptions. I’m pretty sure that this is a bug but I just wanted to check that this wasn’t intentional:
julia> type MyUndefVarError <: Exception
var::Symbol
end
julia> Base.showerror(io::IO, e::MyUndefVarError) = print(io, e.var, " not defined");
julia> showerror(STDOUT, UndefVarError(:foo))
UndefVarError: foo not defined
julia> showerror(STDOUT, MyUndefVarError(:foo))
foo not defined
julia> throw(UndefVarError(:foo))
ERROR: UndefVarError: foo not defined
julia> throw(MyUndefVarError(:foo)) # Should show `ERROR: foo not defined`
ERROR: MyUndefVarError(:foo)