Serves as a specific C++ exception for signaling errors from End-to-End interfaces along with an error code.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 385c2dd6528bProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Serves as a specific C++ exception for signaling errors from End-to-End interfaces along with an error code.
The class ara::com::e2e::ComE2EException serves as a standardized C++ exception for reporting errors from the E2E APIs of communication management ([SWS_CM_12501]). It derives from ara::core::Exception and encapsulates a specific ara::core::ErrorCode passed during instantiation via an exception-safe noexcept constructor ([SWS_CM_12502]). If C++ exceptions are disabled in the compiler toolchain, the triggering function does not participate in overload resolution according to the specification, so this error path requires active exception support.
Within the functional architecture of AUTOSAR Adaptive, ComE2EException acts as a communication bridge between the platform's E2E monitoring routines and the calling application software. If an E2E function detects an error state during the checking or processing of data, this error is transmitted to the higher-level control flow by throwing this exception (AUTOSAR_AP_SWS_CommunicationManagement §8.15.4 “Class: ComE2EException”).
Lifecycle
The instantiation of an object of ComE2EException is performed explicitly by passing an error code to constructor explicit ComE2EException(ara::core::ErrorCode errorCode) noexcept ([SWS_CM_12502], AUTOSAR_AP_SWS_CommunicationManagement §8.15.4.1.1.1 “ComE2EException”). The constructor is specified as noexcept and exception-safe (exception safe) ([SWS_CM_12502]). This guarantees that no further exceptions can be thrown during the construction of the exception itself, which ensures robustness in the error path.
Regarding ownership, the exception is created by the triggering E2E interface and thrown by value (AUTOSAR_AP_SWS_CommunicationManagement §8.15.4 “Class: ComE2EException”). On the application side, the object is typically caught by const reference. As soon as the corresponding handler block is exited, automatic destruction takes place as part of regular C++ stack unwinding. Because the class is defined as final, no subclasses are intended.
Usage Path
The typical sequence when using the exception is divided into the following phases:
The application software calls an E2E-protected function of communication management.
The application catches the exception in a try-catch block. Callers are likely (interpretation) to access the inherited base methods of ara::core::Exception here in order to evaluate the contained ara::core::ErrorCode for error diagnostics. Question Q-8dfac2428f223afe (open)
For the use of ComE2EException, an essential precondition applies regarding the toolchain: according to [SWS_CORE_10304], the function that creates and throws the instance does not participate in overload resolution if C++ exceptions are disabled in the compiler (AUTOSAR_AP_SWS_CommunicationManagement §8.15.4 “Class: ComE2EException”). In runtime environments without C++ exception support, this signaling path therefore does not exist; in this case, errors are presumably (interpretation) transmitted via alternative, non-exception-based platform error mechanisms. Question Q-e1b3f4f1dfc191ef (open)
Provided exceptions are active, each ComE2EException mandatorily carries an error code ([SWS_CM_12502]). As a precondition for instantiation, a valid ara::core::ErrorCode must be available ([SWS_CM_12502]). Since the constructor is declared as exception-safe ([SWS_CM_12502]), object creation itself cannot fail even in an error case.
This guide is based on the AUTOSAR specification R25-11 and was automatically curated.
UML class diagram
Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
gemini-3.8-flash-low· 2026-10-13 · German original