Skip to content
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

Macro method errors are confusing due to hidden arguments #26676

Open
Keno opened this issue Apr 2, 2018 · 0 comments
Open

Macro method errors are confusing due to hidden arguments #26676

Keno opened this issue Apr 2, 2018 · 0 comments
Labels
domain:error handling Handling of exceptions by Julia or the user macros @macros

Comments

@Keno
Copy link
Member

Keno commented Apr 2, 2018

julia> macro foo(x)
       end
@foo (macro with 1 method)

julia> @foo
ERROR: LoadError: MethodError: no method matching @foo(::LineNumberNode, ::Module)
Closest candidates are:
  @foo(::LineNumberNode, ::Module, ::Any) at REPL[1]:2
in expression starting at REPL[2]:1

The hidden module and source arguments show up in the method error message, but don't provide any useful information.

@JeffBezanson JeffBezanson added the domain:error handling Handling of exceptions by Julia or the user label Apr 2, 2018
@ararslan ararslan added the macros @macros label Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:error handling Handling of exceptions by Julia or the user macros @macros
Projects
None yet
Development

No branches or pull requests

3 participants