Violating transaction rules for the 'CommitTransaction' method (CommitTransactionOutsideTryCatch)¶
Type | Scope | Severity | Activated by default |
Minutes to fix |
Tags |
---|---|---|---|---|---|
Error |
BSL OS |
Major |
Yes |
10 |
standard |
Description¶
The CommitTransaction method should be the last one in the Try block, just before the Exception operator, to ensure that there is no exception after the CommitTransaction.
Sources¶
Snippets¶
Diagnostic ignorance in code¶
// BSLLS:CommitTransactionOutsideTryCatch-off
// BSLLS:CommitTransactionOutsideTryCatch-on
Parameter for config¶
"CommitTransactionOutsideTryCatch": false