FaultDetection-UncaughtExceptionEscapingMain

Each exception explicitly thrown in the code shall have a handler of a compatible type in all call paths that could lead to that point

Required inputs: IR, StaticSemanticAnalysis

This check detects exceptions that could terminate the program because they escape from the main function (missing catch handler).

Possible Messages

Key

Text

Severity

Disabled

exception_escaping_main

Uncaught exception escaping from main or additional entry point

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.
 

inspect_at_exit_handlers

inspect_at_exit_handlers : bool = True

Whether to also inspect at_exit() handlers-functions.
 

inspect_atexit_entry_points

inspect_atexit_entry_points : bool = False

Whether to inspect routines set by the atexit/std::atexit function.
 

inspect_thread_main

inspect_thread_main : bool = True

Whether to also inspect thread main functions.