Skip to content

Commit 99dedb6

Browse files
committed
improve error msg
1 parent 2702647 commit 99dedb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/initialization.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ function find_fixpoint(nw::Network, x0::AbstractVector, p::AbstractVector;
6565
# something bad happened
6666
io = IOBuffer()
6767
if isnothing(fn_error)
68-
print(io, "Evaluation of network rhs at t=$t resulted in NaNs! Probable causes:")
68+
nans = findall(isnan, du)
69+
syms = SII.variable_symbols(nw)[nans]
70+
println(io, "Evaluation of network rhs at t=$t resulted in NaNs.)")
71+
println(io, " NaN-Results: ", join(syms, ", "))
72+
print(io,"Probable causes:")
6973
else
7074
print(io, "Evaluation of network rhs at t=$t led to an error! Probable causes:")
7175
end

0 commit comments

Comments
 (0)