Skip to content

Commit d680da2

Browse files
committed
refine message, fix test
1 parent f884651 commit d680da2

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/systems/problem_utils.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,17 +333,14 @@ end
333333
function Base.showerror(io::IO, err::MissingGuessError)
334334
println(io,
335335
"""
336-
Unable to resolve numeric guesses for all of the variables in the system. \
337-
This may be because your guesses are cyclic. In order for the problem to be \
338-
initialized, all of the variables must have a numeric value to serve as a \
339-
starting point for the nonlinear solve.
340-
341-
Symbolic values were found for the following variables/parameters in the map; \
342-
please provide additional numeric guesses so they can resolve to numbers:
336+
Cyclic guesses detected in the system. Symbolic values were found for the following variables/parameters in the map: \
343337
""")
344338
for (sym, val) in zip(err.syms, err.vals)
345-
println(sym, " => ", val)
339+
println(io, "$sym => $val")
346340
end
341+
println(io,
342+
"""
343+
In order to resolve this, please provide additional numeric guesses so that the chain can be resolved to assign numeric values to each variable. """)
347344
end
348345

349346
"""

test/initial_values.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,5 @@ end
215215
@variables a(t) b(t) c(t) d(t) e(t)
216216
eqs = [D(a) ~ b, D(b) ~ c, D(c) ~ d, D(d) ~ e, D(e) ~ 1]
217217
@mtkbuild sys = ODESystem(eqs, t)
218-
@test_throws ["a(t) => ", "c(t) => "] ODEProblem(sys, [e => 2, a => b, b => a + 1, c => d, d => c + 1], (0, 1))
218+
@test_throws ["a(t)", "c(t)"] ODEProblem(sys, [e => 2, a => b, b => a + 1, c => d, d => c + 1], (0, 1))
219219
end

0 commit comments

Comments
 (0)