AutosarC++18_03-A15.3.3

Main function and a task main function shall catch at least: base class exceptions from all third-party libraries used, std::exception and all otherwise unhandled exceptions

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

catch_all_may_throw

Catch-all body may throw exception

None

False

may_throw_outside_catch_all

Code outside catch-all block may throw

None

False

missing_catch_all

Catch-all required around main program body

None

False

missing_catch_handler

Handler for {} needed

None

False

Options

allow_partial_catch_all

allow_partial_catch_all : bool = False

Allow code outside the catch-all block that cannot propagate an exception.
 

external_base_exceptions

external_base_exceptions : set[str] = set()

Sequence of external/third-party exception base-classes that should be caught.
 

inspect_thread_main

inspect_thread_main : bool = True

Whether to also inspect thread main functions.
 

search_catch_all_for_nested_throwing

search_catch_all_for_nested_throwing : bool = False

The catch-all block should also be scanned for throwing.
 

std_base_exceptions

std_base_exceptions : set[str] = {'std::exception'}

Sequence of cpp-std exception base-classes that should be caught