| synopsys.com | 9
Rule Description Automation type Category Supported
A15-0-5 Checked exceptions shall be used to represent errors from which the
caller can reasonably be expected to recover.
Non-automated Required No
A15-0-6 An analysis shall be performed to analyze the failure modes of
exception handling. In particular, the following failure modes shall
be analyzed: (a) worst time execution time not existing or cannot
be determined, (b) stack not correctly unwound, (c) exception not
thrown, other exception thrown, wrong catch activated, (d) memory
not available while exception handling.
Non-automated Required No
A15-0-7 Exception handling mechanism shall guarantee a deterministic
worst-case time execution time.
Partially automated Required Yes
A15-0-8 A worst-case execution time (WCET) analysis shall be performed
to determine maximum execution time constraints of the software,
covering in particular the exceptions processing.
Non-automated Required No
A15-1-1 Only instances of types derived from std::exception should be
thrown.
Automated Advisory Yes
A15-1-2 An exception object shall not be a pointer. Automated Required Yes
A15-1-3 All thrown exceptions should be unique. Automated Advisory Yes
A15-1-4 If a function exits with an exception, then before a throw, the function
shall place all objects/resources that the function constructed in
valid states or it shall delete them.
Partially automated Required Yes
A15-1-5 Exceptions shall not be thrown across execution boundaries. Non-automated Required Yes
A15-2-1 Constructors that are not noexcept shall not be invoked before
program startup.
Automated Required Yes
A15-2-2 If a constructor is not noexcept and the constructor cannot finish
object initialization, then it shall deallocate the object’s resources
and it shall throw an exception.
Partially automated Required Yes
A15-3-2 If a function throws an exception, it shall be handled when
meaningful actions can be taken, otherwise it shall be propagated.
Non-automated Required No
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.
Partially automated Required Yes
A15-3-4 Catch-all (ellipsis and std::exception) handlers shall be used only in
(a) main, (b) task main functions, (c) in functions that are supposed
to isolate independent components and (d) when calling third-
party code that uses exceptions not according to AUTOSAR C++14
guidelines.
Non-automated Required Yes
A15-3-5 A class type exception shall be caught by reference or const
reference.
Automated Required Yes
A15-4-1 Dynamic exception-specification shall not be used. Automated Required Yes
A15-4-2 If a function is declared to be noexcept, noexcept(true) or
noexcept(<true condition>), then it shall not exit with an exception.
Automated Required Yes
A15-4-3 The noexcept specification of a function shall either be identical
across all translation units, or identical or more restrictive between a
virtual member function and an overrider.
Automated Required Yes
A15-4-4 A declaration of non-throwing function shall contain noexcept
specification.
Automated Required Yes
A15-4-5 Checked exceptions that could be thrown from a function shall be
specified together with the function declaration and they shall be
identical in all function declarations and for all its overriders.
Automated Required Yes