mirror of
https://github.com/github/codeql.git
synced 2026-03-06 07:36:47 +01:00
22 lines
527 B
Plaintext
22 lines
527 B
Plaintext
/**
|
|
* @name Poor error handling: empty catch block
|
|
* @description Finds catch clauses with an empty block
|
|
* @kind problem
|
|
* @problem.severity recommendation
|
|
* @precision very-high
|
|
* @id cs/empty-catch-block
|
|
* @tags reliability
|
|
* readability
|
|
* exceptions
|
|
* external/cwe/cwe-390
|
|
* external/cwe/cwe-391
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from CatchClause cc
|
|
where
|
|
cc.getBlock().isEmpty() and
|
|
not exists(CommentBlock cb | cb.getParent() = cc.getBlock())
|
|
select cc, "Poor error handling: empty catch block."
|