exceptions.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. """RDF4J exceptions."""
  2. class RDF4JError(Exception):
  3. """Base class for RDF4J exceptions."""
  4. class RepositoryError(RDF4JError):
  5. """Raised when interactions on a repository result in an error."""
  6. class RepositoryResponseFormatError(RepositoryError):
  7. """Raised when the repository response format is invalid."""
  8. class RepositoryNotFoundError(RepositoryError):
  9. """Raised when the repository is not found."""
  10. class RepositoryNotHealthyError(RepositoryError):
  11. """Raised when the repository is not healthy."""
  12. class RepositoryAlreadyExistsError(RepositoryError):
  13. """Raised when the repository already exists."""
  14. class RDF4JUnsupportedProtocolError(RDF4JError):
  15. """Raised when the server does not support the protocol version."""
  16. class RDFLibParserError(RDF4JError):
  17. """Raised when there is an error parsing the RDF document."""
  18. class RepositoryTransactionError(RDF4JError):
  19. """Raised when there is an error with the transaction."""
  20. class TransactionClosedError(RepositoryTransactionError):
  21. """Raised when the transaction has been closed."""
  22. class TransactionPingError(RepositoryTransactionError):
  23. """Raised when there is an error pinging the transaction."""
  24. class TransactionCommitError(RepositoryTransactionError):
  25. """Raised when there is an error committing the transaction."""
  26. class TransactionRollbackError(RepositoryTransactionError):
  27. """Raised when there is an error rolling back the transaction."""