diff --git a/frappy/modules.py b/frappy/modules.py index 802e2d1..241a9bc 100644 --- a/frappy/modules.py +++ b/frappy/modules.py @@ -68,8 +68,8 @@ class Writable(Readable): target_dt.compatible(value_dt) except Exception: if type(value_dt) == type(target_dt): - raise ConfigError('the target range extends beyond the value range') from None - raise ProgrammingError('the datatypes of target and value are not compatible') from None + raise ConfigError(f'{name}: the target range extends beyond the value range') from None + raise ProgrammingError(f'{name}: the datatypes of target and value are not compatible') from None class Drivable(Writable): diff --git a/frappy/secnode.py b/frappy/secnode.py index 65dc633..73cb56b 100644 --- a/frappy/secnode.py +++ b/frappy/secnode.py @@ -27,6 +27,7 @@ from frappy.dynamic import Pinata from frappy.errors import ConfigError, NoSuchModuleError, NoSuchParameterError from frappy.lib import get_class from frappy.version import get_version +from frappy.modules import Module class SecNode: @@ -131,6 +132,9 @@ class SecNode: # creation has failed already once, do not try again return None cls = classname + if not issubclass(cls, Module): + self.errors.append(f'{cls.__name__} is not a Module') + return None except Exception as e: if str(e) == 'no such class': self.errors.append(f'{classname} not found')