Files
codeql/java/ql/examples/throw_exception.ql
2019-07-26 17:47:11 +02:00

13 lines
355 B
Plaintext

/**
* @name Throw exception of type
* @description Finds places where we throw com.example.AnException or one of its subtypes
* @tags throw
* exception
*/
import java
from ThrowStmt throw
where throw.getThrownExceptionType().getASupertype*().hasQualifiedName("com.example", "AnException")
select throw, "Don't throw com.example.AnException"