From 58fcc1fa58eb6dca548aa84242465526acbc9a85 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Fri, 21 Aug 2026 21:56:21 +0000 Subject: [PATCH] Root the exception hierarchy in pyTooling's ExceptionBase 'VHDLModelException' derived from the builtin 'Exception', so nothing this package raises could be caught alongside the rest of a pyTooling-based stack with one 'except ExceptionBase' clause. The sibling packages that do it this way are pyEDAA.CLITool, OSVVM, OutputFilter and ToolSetup. The 12 derived exceptions all reach 'super().__init__(message)' with a single message, and nothing in the package reads '.args', so the one observable change is that 'ex.args' is now empty while 'str(ex)' keeps working - 'ExceptionBase' stores the text and renders it via '__str__'. It also brings 'HasNotes' and 'Notes'. Co-Authored-By: Patrick Lehmann --- pyVHDLModel/Exception.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyVHDLModel/Exception.py b/pyVHDLModel/Exception.py index 414c89b90..ca922f960 100644 --- a/pyVHDLModel/Exception.py +++ b/pyVHDLModel/Exception.py @@ -36,6 +36,7 @@ message in english, each exception object contains one or multiple references to the exception's context. """ from pyTooling.Decorators import export, readonly +from pyTooling.Exceptions import ExceptionBase from pyTooling.Warning import Warning, CriticalWarning from pyVHDLModel.Symbol import Symbol @@ -93,7 +94,7 @@ class BlackboxWarning(VHDLModelCriticalWarning): @export -class VHDLModelException(Exception): +class VHDLModelException(ExceptionBase): """ Base-class for all exceptions (errors) raised by pyVHDLModel.