Source code for sqlalchemy_jdbcapi.jdbc.exceptions

"""
JDBC Exception hierarchy following DB-API 2.0 specification.
"""

from __future__ import annotations


[docs] class Error(Exception): """Base class for all JDBC-related errors."""
[docs] class Warning(Exception): # noqa: A001 - DB-API 2.0 requires Warning exception class """Exception raised for important warnings."""
[docs] class InterfaceError(Error): """Exception raised for errors related to the database interface."""
[docs] class DatabaseError(Error): """Exception raised for errors related to the database."""
[docs] class InternalError(DatabaseError): """Exception raised when the database encounters an internal error."""
[docs] class OperationalError(DatabaseError): """Exception raised for operational database errors."""
[docs] class ProgrammingError(DatabaseError): """Exception raised for programming errors."""
[docs] class IntegrityError(DatabaseError): """Exception raised when database integrity is violated."""
[docs] class DataError(DatabaseError): """Exception raised for errors related to processed data."""
[docs] class NotSupportedError(DatabaseError): """Exception raised when a method or database API is not supported."""
[docs] class JDBCDriverNotFoundError(InterfaceError): """Exception raised when JDBC driver cannot be found."""
[docs] class JVMNotStartedError(InterfaceError): """Exception raised when JVM is not started."""