diff --git a/ifex/models/common/type_checking_constructor_mixin.py b/ifex/models/common/type_checking_constructor_mixin.py index 8672357..e35ad10 100644 --- a/ifex/models/common/type_checking_constructor_mixin.py +++ b/ifex/models/common/type_checking_constructor_mixin.py @@ -100,7 +100,7 @@ def type_checking_constructor(self, *args, **kwargs): if not is_correct_type(value, arg_types[name]): try: nameinfo = f"Additional Info: The object was named: {self.name}" - except: + except AttributeError: nameinfo = "" raise TypeError(f'Object construction error for class {type(self)}: According to specification, value named \'{name}\' must be of type: {arg_types[name]}, but was instead: {type(value)!r}. {nameinfo}')