Skip to content

Commit dc5acfb

Browse files
feat: add check_compatible_system
1 parent 414521f commit dc5acfb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/systems/codegen.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,15 @@ function isautonomous(sys::System)
228228
tgrad = calculate_tgrad(sys; simplify = true)
229229
all(iszero, tgrad)
230230
end
231+
232+
function check_compatible_system end
233+
234+
struct SystemCompatibilityError <: Exception
235+
msg::String
236+
end
237+
238+
function Base.showerror(io::IO, err::SystemCompatibilityError)
239+
println(io, err.msg)
240+
println(io)
241+
print(io, "To disable this check, pass `check_compatibility = false`.")
242+
end

0 commit comments

Comments
 (0)