You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
717B

  1. # -*- coding: utf-8 -*-
  2. """
  3. maxcul.exceptions
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~
  5. All known exceptions related to Moritz communications
  6. :copyright: (c) 2014 by Markus Ullmann.
  7. :license: BSD, see LICENSE for more details.
  8. """
  9. # environment constants
  10. # python imports
  11. # environment imports
  12. # custom imports
  13. # local constants
  14. class MoritzError(Exception):
  15. """Our base class for all errors"""
  16. pass
  17. class UnknownMessageError(MoritzError):
  18. """Unhandled message ID received"""
  19. pass
  20. class LengthNotMatchingError(MoritzError):
  21. """Message payload length and indicated length differ"""
  22. pass
  23. class MissingPayloadParameterError(MoritzError):
  24. """Parameter missing to construct message"""
  25. pass