From 7aa460719bee7c538689d1b43c27a75e867a1b67 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Sun, 22 Nov 2020 02:53:20 +0900 Subject: [PATCH] throw `ArgumentError` instead --- base/util.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/util.jl b/base/util.jl index a14c08997e856..348b09f3f4c1c 100644 --- a/base/util.jl +++ b/base/util.jl @@ -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 = []