exceptions.py 365 B

123456789101112131415
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. """
  4. Contains custom Exceptions used in ffstatus.
  5. """
  6. class VpnKeyFormatError(Exception):
  7. """Thrown by BaseStorage on invalid VPN keys."""
  8. def __init__(self, key):
  9. Exception.__init__(self)
  10. self.key = key
  11. def __str__(self):
  12. return 'The VPN key has an invalid format: ' + repr(self.key)