-
-
Couldn't load subscription status.
- Fork 5.7k
Description
To me the new exception stack printing (#30900) is not so clear, compare with e.g. this reduced example:
$ cat foo.jl
function foo()
error("hello")
end
foo()
which displays on master as
$ julia-master --color=yes foo.jl
ERROR: Error while loading expression starting at /home/fredrik/foo.jl:4
caused by [exception 1]
hello
Stacktrace:
[1] error(::String) at ./error.jl:33
[...]
[8] _start() at ./client.jl:476
and on Julia 1 as
$ julia11 --color=yes foo.jl
ERROR: LoadError: hello
Stacktrace:
[1] error(::String) at ./error.jl:33
[...]
[8] _start() at ./client.jl:436
in expression starting at /home/fredrik/foo.jl:4
I have two problems with the new printing:
-
From the output on master it took me quite a while to understand that the
hellooutput actually came from theERROR:two lines above. IMO it was more clear before what the error was, and I suggest this should be printed as$ julia-master --color=yes foo.jl ERROR: hello while loading expression starting at /home/fredrik/foo.jl:4 caused by [exception 1] Stacktrace: [1] error(::String) at ./error.jl:33 [...] [8] _start() at ./client.jl:476instead. It seems more important to print the message before the location.
-
When seeing
caused by [exception 1]I would expect a list of exceptions somewhere where I can look up whatexception 1is. What isexception 1in the case above? It is not clear to me.