AUTOSAR C++14 Rule A15-5-3
The std::terminate() function shall not be called implicitly
Description
Rule Definition
The std::terminate() function shall not be called implicitly.
Polyspace Implementation
The checker flags situations that might result in calling the function
std::terminate()
implicitly. These situations might include:
An exception remains unhandled. For instance:
While handling an exception, it escapes through another function that raises an unhandled exception. For instance, a catch statement or exception handler invokes another function that raises an unhandled exception.
An empty
throw
statement raises an unhandled exception again.
For more details, see
Uncaught exception
A class destructor raises an exception.
A termination handler that is passed to
std::atexit
raises an unhandled exception.
Troubleshooting
If you expect a rule violation but Polyspace® does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Exception Handling |
Category: Required, Automated |