We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following code in REPL displays the error message passed through (e, catch_backtrace()) to the @error macro correctly:
(e, catch_backtrace())
@error
julia> try a=b catch e @error "Oh no, exception!" (e, catch_backtrace()) end ┌ Error: Oh no, exception! │ (e, catch_backtrace()) = │ UndefVarError: b not defined │ Stacktrace: │ [1] top-level scope │ @ REPL[8]:2 │ [2] eval │ @ ./boot.jl:373 [inlined] │ [3] eval_user_input(ast::Any, backend::REPL.REPLBackend) │ @ REPL ~/bin/julia-1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:150 │ [4] repl_backend_loop(backend::REPL.REPLBackend) │ @ REPL ~/bin/julia-1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:246 │ [5] start_repl_backend(backend::REPL.REPLBackend, consumer::Any) │ @ REPL ~/bin/julia-1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:231 │ [6] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool) │ @ REPL ~/bin/julia-1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:364 │ [7] run_repl(repl::REPL.AbstractREPL, consumer::Any) │ @ REPL ~/bin/julia-1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:351 │ [8] (::Base.var"#930#932"{Bool, Bool, Bool})(REPL::Module) │ @ Base ./client.jl:394 │ [9] #invokelatest#2 │ @ ./essentials.jl:716 [inlined] │ [10] invokelatest │ @ ./essentials.jl:714 [inlined] │ [11] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool) │ @ Base ./client.jl:379 │ [12] exec_options(opts::Base.JLOptions) │ @ Base ./client.jl:309 │ [13] _start() │ @ Base ./client.jl:495 └ @ Main REPL[8]:4
However, in Jupyter, the error message is displayed in the "raw" form:
Version: Julia Version 1.7.2 Commit bf53498635 (2022-02-06 15:21 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-12.0.1 (ORCJIT, skylake) Environment: JULIA_REVISE_POLL = 1
The text was updated successfully, but these errors were encountered:
IJulia.jl/src/init.jl
Line 112 in cc2a9bf
Sorry, something went wrong.
Thank you, it just works! Is it problematic to run ConsoleLogger as the global logger?
ConsoleLogger
No thats what the REPL does, I don't know why IJulia doesn't. Feel free to make a PR.
I will do that, thank you very much! 🙏
Successfully merging a pull request may close this issue.
Following code in REPL displays the error message passed through
(e, catch_backtrace())
to the@error
macro correctly:However, in Jupyter, the error message is displayed in the "raw" form:
Version:
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_REVISE_POLL = 1
The text was updated successfully, but these errors were encountered: