raise_with_context
Raises a new exception while preserving the current exception context by using the 'from' clause if an active exception exists.
def raise_with_context(
exc: Exception
) - > null
Raises an exception while preserving the current exception context to maintain a clear traceback for debugging.
Parameters
| Name | Type | Description |
|---|---|---|
| exc | Exception | The exception instance to be raised with the current execution context attached. |
Returns
| Type | Description |
|---|---|
null | This function does not return as it always raises an exception. |