Skip to content

Commit 950b26d

Browse files
feat: implement SciMLBase.check_error for null integrator
1 parent b720c53 commit 950b26d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/solve.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ function step!(integ::NullODEIntegrator, dt = nothing, stop_at_tdt = false)
711711
return nothing
712712
end
713713
function SciMLBase.u_modified!(integ::NullODEIntegrator, u) end
714+
SciMLBase.check_error(integ::NullODEIntegrator) = integ.sol.retcode
714715

715716
function hack_null_solution_init(prob)
716717
if SciMLBase.has_initialization_data(prob.f)

test/downstream/null_de.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ end
9393
prob = ODEProblem(Returns(nothing), nothing, (0.0, 1.0))
9494
integ = init(prob, Tsit5())
9595
@test_nowarn SciMLBase.u_modified!(integ, Float64[])
96+
@test SciMLBase.successful_retcode(SciMLBase.check_error(integ))
9697
end

0 commit comments

Comments
 (0)