Introduce an UndefinedModbusException class and use it when the lookup
in error_code_to_exception_map fails. Previously that would just
throw a KeyError with the contained value, so this change makes it
more obvious what actually happened.
Coverage decreased (-0.3%) to 95.969% when pulling c3212d6094017aabe6329a52c646cd82f10c41f3 on acolomb:handle-undefined-error-codes into f1128a73e43f565bacedd1ae99d077d7c9c831f3 on AdvancedClimateSystems:master.
Introduce an UndefinedModbusException class and use it when the lookup in error_code_to_exception_map fails. Previously that would just throw a KeyError with the contained value, so this change makes it more obvious what actually happened.