Wrong stacktrace shown when rethrowing an exception after catching another one #19979
Closed
Description
opened on Jan 11, 2017
function foo()
try
error("error in foo")
catch e
end
end
function bar()
try
error("error in bar")
catch e
foo()
rethrow(e)
end
end
bar()
produces the misleading
ERROR: error in bar
Stacktrace:
[1] foo() at ./REPL[1]:3
[2] bar() at ./REPL[2]:5
This just hit me in a really wicked situation: The stacktrace actually lead me to a line erroneously throwing the reported exception. I fixed it (to throw the correct exception), but the same error kept showing, leaving me completely puzzled for quite some time...
Activity