Raise exception of a class

Author: LGTM

import python

from Raise raise, ClassValue ex
where
  ex.getName() = 'AnException' and
  raise.getException().pointsTo(ex.getASuperType())
select raise, 'Don't raise instances of 'AnException''

Description

Finds places where we raise AnException or one of its subclasses