diff options
Diffstat (limited to 'glucometerutils/exceptions.py')
-rw-r--r-- | glucometerutils/exceptions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/glucometerutils/exceptions.py b/glucometerutils/exceptions.py index 82f8013..1290d9a 100644 --- a/glucometerutils/exceptions.py +++ b/glucometerutils/exceptions.py @@ -27,6 +27,13 @@ class InvalidResponse(Error): self.message = 'Invalid response received:\n%s' % response +class InvalidChecksum(InvalidResponse): + def __init__(self, expected, gotten): + self.message = ( + 'Response checksum not matching: %08x expected, %08x gotten' % + (expected, gotten)) + + class InvalidGlucoseUnit(Error): """Unable to parse the given glucose unit""" |