This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# sqlalchemy/exc.py
|
||||
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
|
||||
# exc.py
|
||||
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
|
||||
# <see AUTHORS file>
|
||||
#
|
||||
# This module is part of SQLAlchemy and is released under
|
||||
@@ -432,14 +432,16 @@ class DontWrapMixin:
|
||||
|
||||
from sqlalchemy.exc import DontWrapMixin
|
||||
|
||||
|
||||
class MyCustomException(Exception, DontWrapMixin):
|
||||
pass
|
||||
|
||||
|
||||
class MySpecialType(TypeDecorator):
|
||||
impl = String
|
||||
|
||||
def process_bind_param(self, value, dialect):
|
||||
if value == 'invalid':
|
||||
if value == "invalid":
|
||||
raise MyCustomException("invalid!")
|
||||
|
||||
"""
|
||||
@@ -571,8 +573,7 @@ class DBAPIError(StatementError):
|
||||
connection_invalidated: bool = False,
|
||||
dialect: Optional[Dialect] = None,
|
||||
ismulti: Optional[bool] = None,
|
||||
) -> StatementError:
|
||||
...
|
||||
) -> StatementError: ...
|
||||
|
||||
@overload
|
||||
@classmethod
|
||||
@@ -586,8 +587,7 @@ class DBAPIError(StatementError):
|
||||
connection_invalidated: bool = False,
|
||||
dialect: Optional[Dialect] = None,
|
||||
ismulti: Optional[bool] = None,
|
||||
) -> DontWrapMixin:
|
||||
...
|
||||
) -> DontWrapMixin: ...
|
||||
|
||||
@overload
|
||||
@classmethod
|
||||
@@ -601,8 +601,7 @@ class DBAPIError(StatementError):
|
||||
connection_invalidated: bool = False,
|
||||
dialect: Optional[Dialect] = None,
|
||||
ismulti: Optional[bool] = None,
|
||||
) -> BaseException:
|
||||
...
|
||||
) -> BaseException: ...
|
||||
|
||||
@classmethod
|
||||
def instance(
|
||||
|
||||
Reference in New Issue
Block a user