From 1843ac12fbe04dc14d81823d1909b3cc75b04dd4 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 17 Jun 2025 13:04:33 +0530 Subject: [PATCH 1/2] docs: fix incorrect FAQ section --- docs/src/basics/FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/basics/FAQ.md b/docs/src/basics/FAQ.md index 1a1ffe75ca..96a65095cf 100644 --- a/docs/src/basics/FAQ.md +++ b/docs/src/basics/FAQ.md @@ -27,7 +27,7 @@ are similarly undocumented. Following is the list of behaviors that should be re parameter with the given index. - `setindex!(::MTKParameters, value, ::ParameterIndex)` can be used to set the value of a parameter with the given index. - - `parameter_values(sys, sym)` will return a `ParameterIndex` object if `sys` has been + - `parameter_index(sys, sym)` will return a `ParameterIndex` object if `sys` has been `complete`d (through `mtkcompile`, `complete` or `@mtkcompile`). - `copy(::MTKParameters)` is defined and duplicates the parameter object, including the memory used by the underlying buffers. From d0765de9c9681175085846950f877b163317aa4b Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 17 Jun 2025 13:04:45 +0530 Subject: [PATCH 2/2] refactor: improve error message for incorrectly named analysis point --- src/systems/analysis_points.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/systems/analysis_points.jl b/src/systems/analysis_points.jl index 4171042908..fa0809dd3c 100644 --- a/src/systems/analysis_points.jl +++ b/src/systems/analysis_points.jl @@ -348,7 +348,12 @@ function modify_nested_subsystem( end # ignore the name of the root if nameof(root) != hierarchy[1] - error("The name of the root system $(nameof(root)) must be included in the name passed to `modify_nested_subsystem`") + error(""" + Invalid analysis point name `$(join(hierarchy, NAMESPACE_SEPARATOR))`. The name + must include the name of the root system `$(nameof(root))`. This typically happens + when using an analysis point obtained by calling `getproperty` on a system marked + as `complete` to linearize a system that is not marked as `complete`. + """) end hierarchy = @view hierarchy[2:end]