mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 22:56:55 +01:00
knowledge(error-handling): a bare [TryFunction] call propagates its error
The review agent repeatedly flagged bare calls to [TryFunction] procedures (e.g. the System Application "Xml Validation" Try* APIs) as defects, including claims that the failure is "silently swallowed". A bare call is an ordinary call: the error propagates as usual. - Add negative knowledge bare-tryfunction-call-propagates-errors.md. - Narrow ignored-tryfunction-return-disables-try-semantics to code that visibly expects the failure to be caught; the bad sample now shows that in code, and the good sample includes an intentional bare call as the clean control. - Qualify "TryFunction catches all errors" in the events article and the "must be consumed" wording in the performance article. - Error-handling leaf worklists both articles for bare [TryFunction] calls and requires the same evidence before flagging. - Add the three paired articles to the evaluation overrides.
This commit is contained in:
parent
ac249ba4c9
commit
da5a28819e
8 changed files with 71 additions and 17 deletions
|
|
@ -33,13 +33,15 @@
|
|||
"articles": [
|
||||
"collect-validation-errors-with-errorbehavior",
|
||||
"defensive-vs-offensive-code-must-match-blast-radius",
|
||||
"log-writes-must-survive-rollback"
|
||||
"log-writes-must-survive-rollback",
|
||||
"ignored-tryfunction-return-disables-try-semantics"
|
||||
]
|
||||
},
|
||||
"events": {
|
||||
"articles": [
|
||||
"reset-ishandled-only-when-the-value-can-carry-over",
|
||||
"changecompany-runs-triggers-in-the-calling-company"
|
||||
"changecompany-runs-triggers-in-the-calling-company",
|
||||
"avoid-raising-events-inside-try-functions"
|
||||
]
|
||||
},
|
||||
"finance": {
|
||||
|
|
@ -85,7 +87,8 @@
|
|||
"use-setloadfields-for-partial-records",
|
||||
"prefer-modifyall-over-per-row-modify",
|
||||
"al-methods-limited-during-write-transactions",
|
||||
"avoid-user-prompts-inside-transactions"
|
||||
"avoid-user-prompts-inside-transactions",
|
||||
"use-tryfunction-for-error-catching-not-rollback"
|
||||
]
|
||||
},
|
||||
"privacy": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue