Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.14 KB

CommitTransactionOutsideTryCatch.md

File metadata and controls

30 lines (20 loc) · 1.14 KB

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