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
A Formal Framework for Behavioral Change Risk
A structured taxonomy for behavioral, contract, concurrency, and side-effect risk in code diffs.
CI Quality Gate for Pull Requests
A practical framework for designing CI quality gates that block risky pull requests instead of only enforcing style, coverage, and known vulnerabilities.
Real-world evidence
Implemented in src/GauntletCI.Core/Rules/Implementations/GCI0007_*.cs.
Eric Cogen -- Founder, GauntletCI
Twenty years as a senior technical consultant building and modernizing enterprise platforms across .NET, AWS, serverless, microservices, and AI-driven systems.
