Error Handling Integrity
Detects swallowed exceptions (empty catch blocks) and exception handling patterns that hide failures from callers and operators.
Why this rule exists
An empty catch turns an actionable failure into a silent one. Operators lose the alert, callers lose the signal, and the bug compounds for hours before someone notices the dashboard is wrong.
Code example
try { await ProcessAsync(order); }
+ catch { } try { await ProcessAsync(order); }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "Order {OrderId} failed", order.Id);
+ throw;
+ }Configuration
Disable or adjust the severity of this rule in .gauntletci.json:
{
"rules": {
"GCI0007": { "enabled": true, "severity": "Block" }
}
}See Configuration for the full schema.
Related rules
Uncaught Exception Path
Fires when throw new is added without a corresponding Assert.Throws or Should().Throw assertion in the test suite.
PII Entity Logging Leak
Detects PII-sensitive terms (email, SSN, password, etc.) appearing inside log calls in added lines.
Nullability and Type Safety
Detects null-forgiving operator (!) overuse, pragma warning disables for nullable, and unchecked as-casts that bypass the type system.
Discussed in
Real-world evidence
Implemented in src/GauntletCI.Core/Rules/Implementations/GCI0007_*.cs.
Eric Cogen -- Founder, GauntletCI
Twenty years in .NET production. Most of those years, the bugs that hurt me were not the ones tests caught. They were the assumptions I did not know I was making: a removed guard clause, a renamed method that still did the old thing, a catch {} that turned a page into a silent dashboard lie. GauntletCI is the checklist I wish I had run before every commit. It runs the rules I learned the hard way, so you do not have to.
