improve error messages on module creation
- add name when target and value datatype are incompatible - check that module class inherits from Module Change-Id: I4edbdff1c250b64b74b1adf7287f9659dff69b26 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/35931 Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch> Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user