errors.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. """
  2. Definition of the various exceptions that are used in Pyro.
  3. Pyro - Python Remote Objects. Copyright by Irmen de Jong (irmen@razorvine.net).
  4. """
  5. class PyroError(Exception):
  6. """Generic base of all Pyro-specific errors."""
  7. pass
  8. class CommunicationError(PyroError):
  9. """Base class for the errors related to network communication problems."""
  10. pass
  11. class ConnectionClosedError(CommunicationError):
  12. """The connection was unexpectedly closed."""
  13. pass
  14. class TimeoutError(CommunicationError):
  15. """
  16. A call could not be completed within the set timeout period,
  17. or the network caused a timeout.
  18. """
  19. pass
  20. class ProtocolError(CommunicationError):
  21. """Pyro received a message that didn't match the active Pyro network protocol, or there was a protocol related error."""
  22. pass
  23. class MessageTooLargeError(ProtocolError):
  24. """Pyro received a message or was trying to send a message that exceeds the maximum message size as configured."""
  25. pass
  26. class NamingError(PyroError):
  27. """There was a problem related to the name server or object names."""
  28. pass
  29. class DaemonError(PyroError):
  30. """The Daemon encountered a problem."""
  31. pass
  32. class SecurityError(PyroError):
  33. """A security related error occurred."""
  34. pass
  35. class SerializeError(ProtocolError):
  36. """Something went wrong while (de)serializing data."""
  37. pass