Skip to content

Commit dd18dc9

Browse files
committed
don't use do syntax for scimlmessage
1 parent ff00df8 commit dd18dc9

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/integrator_interface.jl

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -651,15 +651,13 @@ function check_error(integrator::DEIntegrator)
651651
EEst = ""
652652
end
653653
@warn "dt($(integrator.dt)) <= dtmin($(opts.dtmin)) at t=$(integrator.t)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable."
654-
else
655-
@SciMLMessage(verbose, :dt_min_unstable) do
656-
if isdefined(integrator, :EEst)
657-
EEst = ", and step error estimate = $(integrator.EEst)"
658-
else
659-
EEst = ""
660-
end
661-
"dt($(integrator.dt)) <= dtmin($(opts.dtmin)) at t=$(integrator.t)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable."
662-
end
654+
else
655+
EEst = if isdefined(integrator, :EEst)
656+
", and step error estimate = $(integrator.EEst)"
657+
else
658+
""
659+
end
660+
@SciMLMessage(LazyString("dt(", integrator.dt, ") <= dtmin(", opts.dtmin, ") at t=", integrator.t, EEst, ". Aborting. There is either an error in your model specification or the true solution is unstable."), verbose, :dt_min_unstable)
663661
end
664662
return ReturnCode.DtLessThanMin
665663
elseif !step_accepted && integrator.t isa AbstractFloat &&
@@ -672,14 +670,12 @@ function check_error(integrator::DEIntegrator)
672670
end
673671
@warn "At t=$(integrator.t), dt was forced below floating point epsilon $(integrator.dt)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable (or the true solution can not be represented in the precision of $(eltype(integrator.u)))."
674672
else
675-
@SciMLMessage(verbose, :dt_epsilon) do
676-
if isdefined(integrator, :EEst)
677-
EEst = ", and step error estimate = $(integrator.EEst)"
678-
else
679-
EEst = ""
680-
end
681-
"At t=$(integrator.t), dt was forced below floating point epsilon $(integrator.dt)$EEst. Aborting. There is either an error in your model specification or the true solution is unstable (or the true solution can not be represented in the precision of $(eltype(integrator.u)))."
673+
EEst = if isdefined(integrator, :EEst)
674+
", and step error estimate = $(integrator.EEst)"
675+
else
676+
""
682677
end
678+
@SciMLMessage(LazyString("At t=", integrator.t, ", dt was forced below floating point epsilon ", integrator.dt, EEst, ". Aborting. There is either an error in your model specification or the true solution is unstable (or the true solution can not be represented in the precision of ", eltype(integrator.u), ")."), verbose, :dt_epsilon)
683679
end
684680
return ReturnCode.Unstable
685681
end

0 commit comments

Comments
 (0)