exceptions.py 343 B

123456789101112
  1. class ConnectionInterrupted(Exception):
  2. def __init__(self, connection, parent=None):
  3. self.connection = connection
  4. def __str__(self) -> str:
  5. error_type = type(self.__cause__).__name__
  6. error_msg = str(self.__cause__)
  7. return f"Redis {error_type}: {error_msg}"
  8. class CompressorError(Exception):
  9. pass