exception documentation

Raised when the execution of a database operation fails. Wraps exceptions raised by the DB-API underlying the database operation. Driver-specific implementations of the standard DB-API exception types are wrapped by matching sub-types of SQLAlchemy's :class:`DBAPIError` when possible. DB-API's ``Error`` type maps to :class:`DBAPIError` in SQLAlchemy, otherwise the names are identical. Note that there is no guarantee that different DB-API implementations will raise the same exception type for any given error condition. :class:`DBAPIError` features :attr:`~.StatementError.statement` and :attr:`~.StatementError.params` attributes which supply context regarding the specifics of the statement which had an issue, for the typical case when the error was raised within the context of emitting a SQL statement. The wrapped exception object is available in the :attr:`~.StatementError.orig` attribute. Its type and properties are DB-API implementation specific.

Class Method instance Undocumented
Method __init__ Undocumented
Method __reduce__ Undocumented
Class Variable code Undocumented
Instance Variable connection_invalidated Undocumented

Inherited from StatementError:

Method add_detail Undocumented
Instance Variable detail Undocumented
Instance Variable hide_parameters Undocumented
Instance Variable ismulti multi parameter passed to repr_params(). None is meaningful.
Instance Variable orig The original exception that was thrown.
Instance Variable params The parameter list being used when this exception occurred.
Instance Variable statement The string SQL statement being invoked when this exception occurred.
Method _sql_message Undocumented

Inherited from SQLAlchemyError (via StatementError):

Method __str__ Undocumented
Method _message Undocumented

Inherited from HasDescriptionCode (via StatementError, SQLAlchemyError):

Method _code_str Undocumented
@overload
@classmethod
def instance(cls, statement: Optional[str], params: Optional[_AnyExecuteParams], orig: Exception, dbapi_base_err: Type[Exception], hide_parameters: bool = False, connection_invalidated: bool = False, dialect: Optional[Dialect] = None, ismulti: Optional[bool] = None) -> StatementError:
@overload
@classmethod
def instance(cls, statement: Optional[str], params: Optional[_AnyExecuteParams], orig: DontWrapMixin, dbapi_base_err: Type[Exception], hide_parameters: bool = False, connection_invalidated: bool = False, dialect: Optional[Dialect] = None, ismulti: Optional[bool] = None) -> DontWrapMixin:
@overload
@classmethod
def instance(cls, statement: Optional[str], params: Optional[_AnyExecuteParams], orig: BaseException, dbapi_base_err: Type[Exception], hide_parameters: bool = False, connection_invalidated: bool = False, dialect: Optional[Dialect] = None, ismulti: Optional[bool] = None) -> BaseException:
@classmethod
(source)

Undocumented

def __init__(self, statement: Optional[str], params: Optional[_AnyExecuteParams], orig: BaseException, hide_parameters: bool = False, connection_invalidated: bool = False, code: Optional[str] = None, ismulti: Optional[bool] = None): (source)
def __reduce__(self) -> Union[str, Tuple[Any, ...]]: (source)
connection_invalidated = (source)