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

16 lines
342 B
Plaintext

/**
* @id cpp/examples/throw-exception
* @name Throw exception of type
* @description Finds places where we throw `parse_error` or one of its sub-types
* @tags base
* class
* throw
* exception
*/
import cpp
from ThrowExpr throw
where throw.getType().(Class).getABaseClass*().getName() = "parse_error"
select throw