Defines the error domain for verification errors of end-to-end protection in Adaptive communication.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: bfe73c7b7e47ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Defines the error domain for verification errors of end-to-end protection in Adaptive communication.
The class ara::com::e2e::ComE2EErrorDomain defines the error domain for end-to-end protection errors in AUTOSAR Adaptive Communication Management and maps error codes to the enumeration ComE2EErrc ([SWS_CM_12504]). If a server-side E2E check fails, an ara::core::ErrorCode of this domain is transported in the error response and provided on the client side via ara::core::Result ([SWS_CM_00033]). The stateless, exception-safe class permits error handling either value-based or via ThrowAsException(), whereby this exception method is not available when C++ compiler exceptions are disabled ([SWS_CM_12509]).
Context
The class ara::com::e2e::ComE2EErrorDomain defines the error domain for end-to-end protection (E2E) within Communication Management (ara::com) of the AUTOSAR Adaptive Platform. It derives final from the base class ara::core::ErrorDomain and encapsulates domain-specific errors that occur during the E2E validation of messages.
In the communication model, ComE2EErrorDomain acts as a central identifier and translator for error states during E2E-protected interactions. Via the type aliases Errc ([SWS_CM_12504]) and Exception ([SWS_CM_12505]), the error domain binds the type-specific enumeration ComE2EErrc as well as the derived exception type ComE2EException to the error-specific ecosystem of ara::core. If the server runtime environment detects faulty protection when checking a method request using E2E_check ([SWS_CM_90421]), an E2E error response is transmitted. According to [SWS_CM_00033], the payload of this response message transports an ara::core::ErrorCode of domain ara::com::e2e::ComE2EErrorDomain whose error value corresponds to the result of E2E_check (AUTOSAR_AP_SWS_CommunicationManagement §7.4.1.2.4 “Payload of the E2E Error Response”). On the client side, after removal of the E2E header ([SWS_CM_90475]), this error is deserialized ([SWS_CM_90476], [SWS_CM_10473]) and passed to the application as an error state within an ara::core::Result (AUTOSAR_AP_SWS_CommunicationManagement §7.4.1.2.5 “Deserializing the payload”).
An instance object is created via the default constructor constexpr ComE2EErrorDomain() noexcept ([SWS_CM_12506]). Due to its designation as constexpr, the error domain can already be constructed at compile time. It is typically expected to be provided as an immutable, process-wide singleton, so that references to the domain remain valid throughout the entire program runtime. Question Q-bd1ba0230650e246 (open) Since the class is declared as final, no further derivations are permitted.
The class manages no mutable state and offers complete exception safety ([SWS_CM_12506]). The inspection methods Name() ([SWS_CM_12507]) and Message() ([SWS_CM_12508]) are declared as const and noexcept. As a result, concurrent read access across multiple threads of execution is guaranteed to be thread-safe and free of synchronization overhead.
Usage Path
The typical usage path takes place in the context of the transmission and client-side evaluation of failed E2E checks:
Check and error generation: Upon receiving an E2E-protected request, the server executes the validation using E2E_check ([SWS_CM_90421]). If this check fails, the middleware serializes an error response whose payload contains an ara::core::ErrorCode with ara::com::e2e::ComE2EErrorDomain ([SWS_CM_00033]).
Error diagnostics: The Adaptive Application checks the ara::core::Result. For error logging, Name() returns the identifier of the domain ([SWS_CM_12507]), while Message() returns the human-readable text for the specific numerical code ([SWS_CM_12508]).
Error handling: The application can either evaluate the error in a value-based manner or, if exception handling is enabled, throw a type-specific exception via ThrowAsException() ([SWS_CM_12509]).
If an E2E error occurs during validation, it is identified via the enumeration ComE2EErrc, which is available via the class's type alias Errc ([SWS_CM_12504]). The error codes in ComE2EErrc are expected to correspond directly to the defined result values of E2E_check. Question Q-07fc2c01567ac537 (open)
To propagate the error via C++ exceptions, the method ThrowAsException() instantiates an exception of type ara::com::e2e::ComE2EException (alias Exception, [SWS_CM_12505]) and throws it ([SWS_CM_12509]). The method is declared as noexcept(false). If C++ exceptions are disabled in the compiler toolchain, ThrowAsException() does not participate in overload resolution according to [SWS_CM_12509]. In systems without exception support, error handling must therefore strictly take place via the value-based inspection of ara::core::Result and ara::core::ErrorCode.
This guide is based on the AUTOSAR Adaptive R25-11 specification and was generated automatically.
Creates a new instance of ara::com::e2e::ComE2EException from errorCode and throws it. As per [SWS_CORE_10304], this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e33607e23f70ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function Name of class ara::com::e2e::ComE2EErrorDomain ([SWS_CM_12507]) is called synchronously and without input parameters. It serves the unique identification of the error domain and returns a pointer to a static string constant (const char *) that represents the name of the E2E communication error domain ([SWS_CM_12507]). The interface declaration is provided via the header file ara/com/e2e/e2e_error_domain.h ([SWS_CM_12507]).
Regarding error handling, the function is specified as noexcept and exception safe ([SWS_CM_12507]). It accordingly throws no exceptions and does not fail at runtime; specific error codes or error handling mechanisms are not intended for this call.
Regarding concurrency and boundary conditions, there are no special call or lifecycle constraints. Since the method merely reads an immutable string, the implementation is likely fully reentrant and safe for concurrent calls from arbitrary threads. Question Q-c8158d40c80ce9c5 (open)
Creates a new instance of ara::com::e2e::ComE2EException from errorCode and throws it. As per [SWS_CORE_10304], this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d2262a26cd80ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The member function ThrowAsException of the error domain ara::com::e2e::ComE2EErrorDomain serves, according to [SWS_CM_12509], to encapsulate a passed error code errorCode of type ara::core::ErrorCode into a typed C++ exception of type ara::com::e2e::ComE2EException and throw it synchronously. The function has no return value (void) and is provided via the header ara/com/e2e/e2e_error_domain.h (AUTOSAR_AP_SWS_CommunicationManagement §8.15.3.2.2.3 “ThrowAsException”).
Error Handling and Boundary Conditions
The method is declared with noexcept(false) and explicitly specified as not exception-safe (\"not exception safe\"), since its regular behavior consists in throwing the exception. An essential compiler-side boundary condition is defined by [SWS_CORE_10304]: If C++ exceptions are disabled in the compiler's toolchain, this function does not participate in overload resolution. Callers must therefore ensure that exception-based error handling is supported and active in the target system.
gemini-3.8-flash-low· 2026-10-13 · German original