Skip to content

Commit

Permalink
remove USAGE part of error message when using main macro
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Jul 5, 2024
1 parent 1193997 commit d8c6589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,11 @@ const main = MyApp.main
"""
macro main(args...)
if !isempty(args)
error("USAGE: `@main` is expected to be used as `(@main)` without macro arguments.")
error("`@main` is expected to be used as `(@main)` without macro arguments.")
end
if isdefined(__module__, :main)
if Base.binding_module(__module__, :main) !== __module__
error("USAGE: Symbol `main` is already a resolved import in module $(__module__). `@main` must be used in the defining module.")
error("Symbol `main` is already a resolved import in module $(__module__). `@main` must be used in the defining module.")
end
end
Core.eval(__module__, quote
Expand Down

0 comments on commit d8c6589

Please sign in to comment.