ogn-python/ogn/exceptions.py

13 wiersze
393 B
Python
Czysty Zwykły widok Historia

2015-11-15 18:21:19 +00:00
"""
exception definitions
"""
class AprsParseError(Exception):
"""Parse error while parsing an aprs packet substring."""
def __init__(self, substring, expected_type):
self.message = "Aprs Substring can't be parsed as %s." % expected_type
super(AprsParseError, self).__init__(self.message)
self.substring = substring
self.expected_type = expected_type