From c00c6933243957cce160d9e7676c0de036c8263f Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Fri, 30 Aug 2024 11:44:39 +0530 Subject: [PATCH] refactor: improve error messages for under- and over-determined systems --- src/systems/abstractsystem.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/systems/abstractsystem.jl b/src/systems/abstractsystem.jl index 92d105823b..c43aa239d2 100644 --- a/src/systems/abstractsystem.jl +++ b/src/systems/abstractsystem.jl @@ -2747,14 +2747,20 @@ struct ExtraVariablesSystemException <: Exception msg::String end function Base.showerror(io::IO, e::ExtraVariablesSystemException) - print(io, "ExtraVariablesSystemException: ", e.msg) + println(io, "ExtraVariablesSystemException: ", e.msg) + print(io, + "Note that the process of determining extra variables is a best-effort heuristic. " * + "The true extra variables are dependent on the model and may not be in this list.") end struct ExtraEquationsSystemException <: Exception msg::String end function Base.showerror(io::IO, e::ExtraEquationsSystemException) - print(io, "ExtraEquationsSystemException: ", e.msg) + println(io, "ExtraEquationsSystemException: ", e.msg) + print(io, + "Note that the process of determining extra equations is a best-effort heuristic. " * + "The true extra equations are dependent on the model and may not be in this list.") end struct HybridSystemNotSupportedException <: Exception