Implement the :class:`.ExceptionContext` interface.
| 2437 | |
| 2438 | |
| 2439 | class ExceptionContextImpl(ExceptionContext): |
| 2440 | """Implement the :class:`.ExceptionContext` interface.""" |
| 2441 | |
| 2442 | __slots__ = ( |
| 2443 | "connection", |
| 2444 | "engine", |
| 2445 | "dialect", |
| 2446 | "cursor", |
| 2447 | "statement", |
| 2448 | "parameters", |
| 2449 | "original_exception", |
| 2450 | "sqlalchemy_exception", |
| 2451 | "chained_exception", |
| 2452 | "execution_context", |
| 2453 | "is_disconnect", |
| 2454 | "invalidate_pool_on_disconnect", |
| 2455 | "is_pre_ping", |
| 2456 | ) |
| 2457 | |
| 2458 | def __init__( |
| 2459 | self, |
| 2460 | exception: BaseException, |
| 2461 | sqlalchemy_exception: Optional[exc.StatementError], |
| 2462 | engine: Optional[Engine], |
| 2463 | dialect: Dialect, |
| 2464 | connection: Optional[Connection], |
| 2465 | cursor: Optional[DBAPICursor], |
| 2466 | statement: Optional[str], |
| 2467 | parameters: Optional[_DBAPIAnyExecuteParams], |
| 2468 | context: Optional[ExecutionContext], |
| 2469 | is_disconnect: bool, |
| 2470 | invalidate_pool_on_disconnect: bool, |
| 2471 | is_pre_ping: bool, |
| 2472 | ): |
| 2473 | self.engine = engine |
| 2474 | self.dialect = dialect |
| 2475 | self.connection = connection |
| 2476 | self.sqlalchemy_exception = sqlalchemy_exception |
| 2477 | self.original_exception = exception |
| 2478 | self.execution_context = context |
| 2479 | self.statement = statement |
| 2480 | self.parameters = parameters |
| 2481 | self.is_disconnect = is_disconnect |
| 2482 | self.invalidate_pool_on_disconnect = invalidate_pool_on_disconnect |
| 2483 | self.is_pre_ping = is_pre_ping |
| 2484 | |
| 2485 | |
| 2486 | class Transaction(TransactionalContext): |
no outgoing calls
no test coverage detected