From 2e7ed24c829bcb928b8bc36cc64a27147221d8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Wed, 13 Mar 2024 23:57:05 +0100 Subject: [PATCH] adapter.xml: change type of an exception to `AssertionError` The respective exception marks an error in the program, which should correctly be an `AssertionError`. --- basyx/aas/adapter/xml/xml_deserialization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basyx/aas/adapter/xml/xml_deserialization.py b/basyx/aas/adapter/xml/xml_deserialization.py index 31b5012fb..298ea6291 100644 --- a/basyx/aas/adapter/xml/xml_deserialization.py +++ b/basyx/aas/adapter/xml/xml_deserialization.py @@ -315,8 +315,8 @@ def _failsafe_construct_mandatory(element: etree.Element, constructor: Callable[ """ constructed = _failsafe_construct(element, constructor, False, **kwargs) if constructed is None: - raise TypeError("The result of a non-failsafe _failsafe_construct() call was None! " - "This is a bug in the Eclipse BaSyx Python SDK XML deserialization, please report it!") + raise AssertionError("The result of a non-failsafe _failsafe_construct() call was None! " + "This is a bug in the Eclipse BaSyx Python SDK XML deserialization, please report it!") return constructed