-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
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
Limit nothing
interpolation error to AbstractCmd
subtypes
#30008
Comments
I think this is actually a bug in the error throwing code, which should be using show/repr instead of interpolation. For example:
|
I've also found this to be an annoyance with the change: julia> x = nothing
julia> @error "Found unexpected value: $x"
┌ Error: Exception while generating log record in module Main at REPL[2]:1
│ exception =
│ ArgumentError: `nothing` should not be printed; use `show`, `repr`, or custom output instead.
│ Stacktrace:
│ [1] print(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Nothing) at ./show.jl:566
│ [2] print_to_string(::String, ::Vararg{Any,N} where N) at ./strings/io.jl:122
│ [3] string(::String, ::Nothing) at ./strings/io.jl:155
│ [4] top-level scope at logging.jl:321
│ [5] eval(::Module, ::Any) at ./boot.jl:319
│ [6] eval_user_input(::Any, ::REPL.REPLBackend) at /Users/omus/Development/Julia/1.0/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85
│ [7] macro expansion at /Users/omus/Development/Julia/1.0/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined]
│ [8] (::getfield(REPL, Symbol("##28#29")){REPL.REPLBackend})() at ./task.jl:259
└ @ Main REPL[2]:1 |
I agree, let's just restrict the error to splicing |
It seems like most of the time this issue comes up it is actually a bug that is being discovered. |
Thanks for the reminder. This issue has been resolved. At least all of the original gripes. |
The introduction of disallowing
print
/string
withnothing
(#27829) has introduced some headaches. From a recent #gripes session:The text was updated successfully, but these errors were encountered: