Skip to content

Commit 5963a5b

Browse files
Merge pull request #3743 from AayushSabharwal/as/doc-changes
docs: fix FAQ docs, improve analysis point error message
2 parents abf49bb + d0765de commit 5963a5b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/src/basics/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ are similarly undocumented. Following is the list of behaviors that should be re
2727
parameter with the given index.
2828
- `setindex!(::MTKParameters, value, ::ParameterIndex)` can be used to set the value of a
2929
parameter with the given index.
30-
- `parameter_values(sys, sym)` will return a `ParameterIndex` object if `sys` has been
30+
- `parameter_index(sys, sym)` will return a `ParameterIndex` object if `sys` has been
3131
`complete`d (through `mtkcompile`, `complete` or `@mtkcompile`).
3232
- `copy(::MTKParameters)` is defined and duplicates the parameter object, including the
3333
memory used by the underlying buffers.

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)