Skip to content

Commit 70941f9

Browse files
author
Michael Abbott
committed
tweak
1 parent 1deb12b commit 70941f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/graphs.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ function register_single_loop!(ls::LoopSet, looprange::Expr)
526526
U = add_loop_bound!(ls, itersym, Expr(:call, lv(:maybestaticlast), N), true)
527527
loop = Loop(itersym, L, U)
528528
else
529-
throw("Unrecognized loop range type: $r.")
529+
throw(LoopError("Unrecognized loop range type: $r."))
530530
end
531531
add_loop!(ls, loop, itersym)
532532
nothing
@@ -819,6 +819,6 @@ struct LoopError <: Exception
819819
end
820820

821821
function Base.showerror(io::IO, err::LoopError)
822-
printstyled(io, err.msg, '\n'; color = :red)
823-
printstyled(io, err.ex)
822+
printstyled(io, err.msg; color = :red)
823+
isnothing(err.ex) || printstyled(io, '\n', err.ex)
824824
end

0 commit comments

Comments
 (0)