Files
codeql/cpp/ql/examples/snippets/catch_exception.ql
2019-07-26 17:47:11 +02:00

15 lines
342 B
Plaintext

/**
* @name Catch exception
* @description Finds places where we catch exceptions of type `parse_error`
* @tags catch
* try
* exception
*/
import cpp
from CatchBlock catch
// `stripType` converts `const parse_error &` to `parse_error`.
where catch.getParameter().getType().stripType().hasName("parse_error")
select catch