Source code for rdf4j_python.exception.repo_exception
[docs]classRdf4jError(Exception):"""Base exception for all RDF4J SDK errors. All exceptions raised by the RDF4J Python SDK inherit from this class, allowing users to catch all SDK-related errors with a single except clause. Example: try: await repo.query("SELECT * WHERE { ?s ?p ?o }") except Rdf4jError as e: # Catches any RDF4J SDK error print(f"RDF4J error: {e}") """
[docs]classRepositoryError(Rdf4jError):"""Base exception for repository-related errors."""
[docs]classRepositoryCreationException(RepositoryError):"""Exception raised when a repository creation fails."""
[docs]classRepositoryDeletionException(RepositoryError):"""Exception raised when a repository deletion fails."""
[docs]classRepositoryNotFoundException(RepositoryError):"""Exception raised when a repository is not found."""
[docs]classRepositoryInternalException(RepositoryError):"""Exception raised when a repository internal error occurs."""
[docs]classRepositoryUpdateException(RepositoryError):"""Exception raised when a repository update fails."""
[docs]classNamespaceException(Rdf4jError):"""Exception raised when a namespace operation fails."""
[docs]classNetworkError(Rdf4jError):"""Exception raised when a network/connection error occurs."""
[docs]classQueryError(Rdf4jError):"""Exception raised when a SPARQL query is invalid or fails."""
[docs]classTransactionError(Rdf4jError):"""Base exception for transaction-related errors."""
[docs]classTransactionStateError(TransactionError):"""Exception raised when a transaction operation is invalid for the current state. For example, trying to commit an already committed transaction, or trying to add statements to a closed transaction. """