Skip to content

Commit d0765de

Browse files
refactor: improve error message for incorrectly named analysis point
1 parent 1843ac1 commit d0765de

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/systems/analysis_points.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,12 @@ function modify_nested_subsystem(
348348
end
349349
# ignore the name of the root
350350
if nameof(root) != hierarchy[1]
351-
error("The name of the root system $(nameof(root)) must be included in the name passed to `modify_nested_subsystem`")
351+
error("""
352+
Invalid analysis point name `$(join(hierarchy, NAMESPACE_SEPARATOR))`. The name
353+
must include the name of the root system `$(nameof(root))`. This typically happens
354+
when using an analysis point obtained by calling `getproperty` on a system marked
355+
as `complete` to linearize a system that is not marked as `complete`.
356+
""")
352357
end
353358
hierarchy = @view hierarchy[2:end]
354359

0 commit comments

Comments
 (0)