Skip to content

Commit

Permalink
throw ArgumentError instead
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Dec 1, 2020
1 parent 5e46774 commit 7aa4607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ Provides a convenient way to call [`Base.invokelatest`](@ref).
`Base.invokelatest(f, args...; kwargs...)`.
"""
macro invokelatest(ex)
@assert is_expr(ex, :call) "call expression f(args...; kwargs...) should be given"
is_expr(ex, :call) || throw(ArgumentError("a call expression f(args...; kwargs...) should be given"))

f = first(ex.args)
args = []
Expand Down

0 comments on commit 7aa4607

Please sign in to comment.