Skip to content

Commit 6f4bad4

Browse files
Merge pull request #2693 from sathvikbhagavan/sb/nonlinear
refactor: remove `check_length` in the error message of unbalanced system
2 parents cadd012 + 5384e58 commit 6f4bad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/abstractsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,13 +2219,13 @@ function check_eqs_u0(eqs, dvs, u0; check_length = true, kwargs...)
22192219
if u0 !== nothing
22202220
if check_length
22212221
if !(length(eqs) == length(dvs) == length(u0))
2222-
throw(ArgumentError("Equations ($(length(eqs))), unknowns ($(length(dvs))), and initial conditions ($(length(u0))) are of different lengths. To allow a different number of equations than unknowns use kwarg check_length=false."))
2222+
throw(ArgumentError("Equations ($(length(eqs))), unknowns ($(length(dvs))), and initial conditions ($(length(u0))) are of different lengths."))
22232223
end
22242224
elseif length(dvs) != length(u0)
22252225
throw(ArgumentError("Unknowns ($(length(dvs))) and initial conditions ($(length(u0))) are of different lengths."))
22262226
end
22272227
elseif check_length && (length(eqs) != length(dvs))
2228-
throw(ArgumentError("Equations ($(length(eqs))) and Unknowns ($(length(dvs))) are of different lengths. To allow these to differ use kwarg check_length=false."))
2228+
throw(ArgumentError("Equations ($(length(eqs))) and Unknowns ($(length(dvs))) are of different lengths."))
22292229
end
22302230
return nothing
22312231
end

0 commit comments

Comments
 (0)