Skip to content

refactor: improve error messages for under- and over-determined systems #3000

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/systems/abstractsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading