Files
codeql/cpp/ql/examples/snippets/catch_exception.ql
2019-08-02 15:29:20 +02:00

16 lines
377 B
Plaintext

/**
* @id cpp/examples/catch-exception
* @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