Browse Source

Remove `LineNumberNode`s from `at-assert` macro to help coverage. (#11)

pull/12/head
Fredrik Ekre 2 years ago committed by GitHub
parent
commit
5be4848297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/Prometheus.jl

4
src/Prometheus.jl

@ -25,9 +25,7 @@ unreachable() = throw(UnreachableError()) @@ -25,9 +25,7 @@ unreachable() = throw(UnreachableError())
struct AssertionError <: PrometheusException end
macro assert(cond)
return quote
$(esc(cond)) || throw(AssertionError())
end
return :($(esc(cond)) || throw(AssertionError()))
end
function Base.showerror(io::IO, err::Union{AssertionError, UnreachableError})

Loading…
Cancel
Save