Changes between Version 1 and Version 2 of Ticket #36318, comment 4
- Timestamp:
- Apr 11, 2025, 10:25:14 AM (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36318, comment 4
v1 v2 7 7 > When exiting an `atomic` block, Django looks at whether it’s exited normally or with an exception to determine whether to commit or roll back. If you catch and handle exceptions inside an `atomic` block, you may hide from Django the fact that a problem has happened. **This can result in unexpected behavior.** 8 8 9 I'm pretty confident we'll be able to avoid surfacing the previous exception message as the sourceof the `TransactionManagementError` with9 I'm pretty confident we'll be able to avoid surfacing the previous exception message as [https://github.com/django/django/blob/21f8be76d43aa1ee5ae41c1e0a428cfea1f231c1/django/db/backends/base/base.py#L519-L524 the __cause__] of the `TransactionManagementError` with 10 10 11 11 {{{#!diff