FaultDetection-ExceptionInsideThrow

The assignment-expression of a throw statement shall not itself cause an exception to be thrown

Required inputs: IR, StaticSemanticAnalysis

This check detects throw statements where the operand to be thrown could in itself cause an exception to be thrown.

Possible Messages

Key

Text

Severity

Disabled

throw_expression_raises_exception

Expression of throw may itself raise an exception

None

False

Options

exclude_exception_base_classes

exclude_exception_base_classes : set[bauhaus.analysis.config.QualifiedName] = set()

Exclude issues for the exception types mentioned in this set of qualified names. Also excludes classes derived from those class names as well as pointers or references to any of these class types.
 

generate_violation_path

generate_violation_path : bool = True

Whether to compute a trace for the exception. This improves the usability of the violation description, but requires additional computing which might slow down the rule.