From 1ee924a0677b1917e705990f72668cbb4601ed38 Mon Sep 17 00:00:00 2001 From: "Erin (Jianghua) Le" Date: Mon, 7 Oct 2024 13:45:03 -0700 Subject: [PATCH] python: clarify SimObject error message (#1625) This adds more detail to the error message that is thrown when an orphan node is instantiated. --- src/python/m5/SimObject.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index ce098bea7d..72bf692b6b 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -1259,7 +1259,9 @@ class SimObject(metaclass=MetaSimObject): if not self._ccObject: # Make sure this object is in the configuration hierarchy if not self._parent and not isRoot(self): - raise RuntimeError("Attempt to instantiate orphan node") + raise RuntimeError( + f"Attempt to instantiate orphan node {self}" + ) # Cycles in the configuration hierarchy are not supported. This # will catch the resulting recursion and stop. self._ccObject = -1