Skip to content

Commit 40863db

Browse files
committed
Better default_model_name
1 parent 5fea3ec commit 40863db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/model_parsing.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ const accept_unnamed_model = ScopedValue(false)
22
macro accept_unnamed_model(expr)
33
esc(:($with(()->$expr, $ModelingToolkit.accept_unnamed_model => true)))
44
end
5-
function default_model_name(m::Model)
5+
function default_model_name(m)
66
if accept_unnamed_model[]
77
return :unnamed
88
else
9-
error("Model constructors require a `name=` keyword argument ",
10-
"(or usage of `@named`, `@mtkbuild`)")
9+
error("Model constructor ", m, " require a `name=` keyword argument ",
10+
"(or usage of `@named`, `@mtkcompile`)")
1111
end
1212
end
1313

0 commit comments

Comments
 (0)