Skip to content

Commit cf9403d

Browse files
committed
replace throw with error
1 parent 5fa3032 commit cf9403d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/OrdinaryDiffEqCore/src/initialize_dae.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function _initialize_dae!(integrator, prob::ODEProblem,
5151
_initialize_dae!(integrator, prob,
5252
OverrideInit(integrator.opts.abstol), x)
5353
elseif !isdefined(Main, :OrdinaryDiffEqNonlinearSolve)
54-
throw("`OrdinaryDiffEqNonlinearSolve` is not loaded, which is required for the default initialization algorithm (`BrownFullBasicInit` or `ShampineCollocationInit`). To solve this problem, either do `using OrdinaryDiffEqNonlinearSolve` or pass `initializealg = CheckInit()` to the `solve` function. This second option requires consistent `u0`.")
54+
error("`OrdinaryDiffEqNonlinearSolve` is not loaded, which is required for the default initialization algorithm (`BrownFullBasicInit` or `ShampineCollocationInit`). To solve this problem, either do `using OrdinaryDiffEqNonlinearSolve` or pass `initializealg = CheckInit()` to the `solve` function. This second option requires consistent `u0`.")
5555
else
5656
_initialize_dae!(integrator, prob,
5757
BrownFullBasicInit(integrator.opts.abstol), x)
@@ -64,7 +64,7 @@ function _initialize_dae!(integrator, prob::DAEProblem,
6464
_initialize_dae!(integrator, prob,
6565
OverrideInit(integrator.opts.abstol), x)
6666
elseif !isdefined(Main, :OrdinaryDiffEqNonlinearSolve)
67-
throw("`OrdinaryDiffEqNonlinearSolve` is not loaded, which is required for the default initialization algorithm (`BrownFullBasicInit` or `ShampineCollocationInit`). To solve this problem, either do `using OrdinaryDiffEqNonlinearSolve` or pass `initializealg = CheckInit()` to the `solve` function. This second option requires consistent `u0`.")
67+
error("`OrdinaryDiffEqNonlinearSolve` is not loaded, which is required for the default initialization algorithm (`BrownFullBasicInit` or `ShampineCollocationInit`). To solve this problem, either do `using OrdinaryDiffEqNonlinearSolve` or pass `initializealg = CheckInit()` to the `solve` function. This second option requires consistent `u0`.")
6868
elseif prob.differential_vars === nothing
6969
_initialize_dae!(integrator, prob,
7070
ShampineCollocationInit(), x)

0 commit comments

Comments
 (0)