It would be useful to track information about the failure which causes a transaction to enter the "must rollback" state, and report a verbose message if the user attempts to commit such a transaction.
I expect this to involve:
- Saving an error code and error string into the transaction structure when an error is flagged.
- If a call is made to commit a transaction that must be rolled back report the root cause for the required rollback.