From cf9403de8b4324800865bd26eb2fdbf93f2c8194 Mon Sep 17 00:00:00 2001 From: Isaac Wheeler Date: Mon, 9 Dec 2024 11:54:42 +0100 Subject: [PATCH] replace throw with error --- lib/OrdinaryDiffEqCore/src/initialize_dae.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/initialize_dae.jl b/lib/OrdinaryDiffEqCore/src/initialize_dae.jl index 67107ac335..1c887bc719 100644 --- a/lib/OrdinaryDiffEqCore/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqCore/src/initialize_dae.jl @@ -51,7 +51,7 @@ function _initialize_dae!(integrator, prob::ODEProblem, _initialize_dae!(integrator, prob, OverrideInit(integrator.opts.abstol), x) elseif !isdefined(Main, :OrdinaryDiffEqNonlinearSolve) - 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`.") + 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`.") else _initialize_dae!(integrator, prob, BrownFullBasicInit(integrator.opts.abstol), x) @@ -64,7 +64,7 @@ function _initialize_dae!(integrator, prob::DAEProblem, _initialize_dae!(integrator, prob, OverrideInit(integrator.opts.abstol), x) elseif !isdefined(Main, :OrdinaryDiffEqNonlinearSolve) - 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`.") + 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`.") elseif prob.differential_vars === nothing _initialize_dae!(integrator, prob, ShampineCollocationInit(), x)