AutosarC++18_10-A15.1.2ΒΆ
An exception object shall not be a pointer
Required inputs: IR
new when throwing exceptions, as it is unclear
who would have the responsibility for freeing the exception object.
Instead, throw exceptions by value.
Example
try
{
throw MyException(args);
}
catch (const MyException& ex)
{
...
}
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
throwing_pointer |
Exception object of pointer type |
None |
False |
Options
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.