-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
error messagesBetter, more actionable error messagesBetter, more actionable error messages
Description
This is not a great UX:
julia> t = Task(() -> 4)
Task (runnable) @0x0000ffff6826d370
julia> t.scope
ERROR: Querying `scope` is disallowed. Use `current_scope` instead.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] getproperty(t::Task, field::Symbol)
@ Base ./task.jl:184
[3] top-level scope
@ REPL[65]:1
julia> current_scope
ERROR: UndefVarError: `current_scope` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
julia> t.current_scope
ERROR: type Task has no field current_scope
Stacktrace:
[1] getproperty(t::Task, field::Symbol)
@ Base ./task.jl:186
[2] top-level scope
@ REPL[67]:1
julia> Base.current_scope
ERROR: UndefVarError: `current_scope` not defined in `Base`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:42
[2] top-level scope
@ REPL[68]:1
help?> current_scope
search: current_task current_exceptions
Couldn't find current_scope
Perhaps you meant current_task
No documentation found.
Binding current_scope does not exist.
julia> Core.current_scope
current_scope (built-in function)Line 183 in e57a7e4
| error("Querying `scope` is disallowed. Use `current_scope` instead.") |
Either the error should mention that the function is internal, or it should specify how to get a public handle on that function.
Metadata
Metadata
Assignees
Labels
error messagesBetter, more actionable error messagesBetter, more actionable error messages