Encapsulates and identifies general communication errors of the middleware for standardized error handling.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 13073fe45989ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Encapsulates and identifies general communication errors of the middleware for standardized error handling.
The class ara::com::ComErrorDomain represents the communication error domain for identifying general, non-interface-specific errors in the ara::com API ([SWS_CM_11265]). It provides error descriptions for error codes such as ComErrc::kCommunicationFailure and enables querying them via Message() or converting them into an exception using ThrowAsException() ([SWS_CM_11332]). Because its default constructor is deleted, it acts as a stateless, thread-safe domain instance for the error-carrying ara::core::Result.
Context
The class ara::com::ComErrorDomain represents the standardized communication error domain of the Adaptive Platform for the Communication Management functional cluster (SWS CommunicationManagement p. 439). It derives from the base class ara::core::ErrorDomain and defines the semantic context for general errors that may occur during method calls or data transmissions, but are not specific to a single ServiceInterface ([SWS_CM_11265]). In the error architecture of ara::com, it systematically distinguishes general communication disruptions from E2E monitoring errors as well as application-specific service errors (SWS CommunicationManagement §7.5.22.6 “Error Related Data Types”).
Its central interaction partners include the Adaptive Application, the service and proxy implementations of the middleware, and the data types ara::core::ErrorCode and ara::core::Result of the base system (EXP ARAComAPI §4.7 “Error Handling”). For semantic type binding, the class provides the type aliases Errc for the error code enumeration ComErrc ([SWS_CM_11336]) and Exception for the associated exception class ComException ([SWS_CM_11337]).
As a specification class for an error domain, creation of ara::com::ComErrorDomain is prevented by the deletion of the default constructor ComErrorDomain() = delete; ([SWS_CM_11330]). Interpretation: Provision of the domain instance is presumably carried out as a static singleton via the platform, so that application components do not need to dynamically instantiate or manage the domain. Question Q-bf957a108c0a5378 (open)
The instance acts as a stateless descriptor without mutable attributes. All provided methods, such as Name() ([SWS_CM_11331]) and Message() ([SWS_CM_11332]), are declared as const noexcept. This guarantees full thread safety for concurrent error queries by parallel application and middleware threads.
Usage Path
The typical usage path comprises the detection, transmission, and evaluation of an error via the interfaces of ara::com:
The application initiates a service interaction, for example via the call operator of the method class operator() ([SWS_CM_00196]).
If the middleware detects an error during processing, such as a communication failure or an unconfigured application error ([SWS_CM_00048]), the operation SetError is called on the corresponding Promise (SWS CommunicationManagement p. 300).
In doing so, an ara::core::ErrorCode is constructed whose domain is set to ara::com::ComErrorDomain ([SWS_CM_11329]) and whose numerical code is set to a specific enum value such as ComErrc::kCommunicationFailure ([SWS_CM_10432]).
The ara::core::Future or ara::core::Result returned to the application transports the error code in the error state to the caller (EXP ARAComAPI §4.7 “Error Handling”).
The application checks the Result and uses the domain functions Name() ([SWS_CM_11331]) and Message() ([SWS_CM_11332]) to resolve error messages for logging or diagnostics.
If the application logic expects an exception and C++ exceptions are enabled, conversion into an ComException can be triggered using ThrowAsException() ([SWS_CM_11333]).
The error concept of ara::com strictly distinguishes between recoverable errors and severe programming violations (violations or corruptions) (EXP ARAComAPI §4.7 “Error Handling”). Recoverable errors are handled via ara::core::Result and ara::core::ErrorCode, with error codes of domain ComErrorDomain being addressed via the identifier alias Errc ([SWS_CM_11336]).
If, for example, a transmission interruption occurs during a remote call, the system reports ComErrc::kCommunicationFailure ([SWS_CM_10432]). In the event of an unconfigured application error, the middleware aborts the call and likewise sets a corresponding error code of the domain ([SWS_CM_00048], SWS CommunicationManagement p. 300).
If an error code is to be thrown as an exception, ThrowAsException() instantiates an exception of type ComException ([SWS_CM_11337]) and throws it ([SWS_CM_11333]). This method is not exception-safe (not exception safe) and, according to the specification, does not participate in overload resolution when C++ exceptions are disabled ([SWS_CM_11333]). Non-recoverable system violations, on the other hand, lead directly to a platform abort and are not handled via ComErrorDomain (EXP ARAComAPI §4.7 “Error Handling”).
This guide was generated by an AI based on the AUTOSAR specifications R25-11.
Creates a new instance of ara::com::ComException 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: 4c51965f3a93ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The member function Name() of class ara::com::ComErrorDomain serves for the standardized retrieval of the textual designation of this error domain ([SWS_CM_11331]). The call is synchronous, requires no input parameters, and returns a constant pointer of type const char * to the associated string ([SWS_CM_11331]). The exact representation of the returned string conforms to the requirements for ara::com::ComErrorDomain in [SWS_CORE_90023]. The declaration must be included via the header ara/com/com_error_domain.h ([SWS_CM_11331]).
Error Handling and Concurrency
The method is provided with the specification noexcept and classified as exception safe (exception safe) ([SWS_CM_11331]). In case of an error, neither exceptions are thrown nor specific error codes are reported, as it is a pure read operation. Since only an immutable string constant is addressed, the method is likely reentrant and safely supports concurrent calls from multiple threads without external synchronization. Question Q-a9f6ae55558ebb1f (open)
Interaction
The function is part of the standardized error domain identifiers within communication management (AUTOSAR_AP_SWS_CommunicationManagement §1 “Change History”). The naming and interface scheme is implemented consistently across related domains: Thus, the end-to-end error domain ara::com::e2e::ComE2EErrorDomain via [SWS_CM_12507] as well as the SecOC FVM error domain apext::com::secoc::ComSecOcFvmErrorDomain via [SWS_CM_12518] also define similar Name() methods for identification.
This text was generated by an AI based on the AUTOSAR specification.
Creates a new instance of ara::com::ComException 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: bc30613084e7ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The member function ThrowAsException of the error domain ara::com::ComErrorDomain ([SWS_CM_11333]; SWS CommunicationManagement §8.12.4.2.2.3 “ThrowAsException”) synchronously creates an instance of the exception ara::com::ComException from a passed error code errorCode (of type const ara::core::ErrorCode&) and throws it immediately. The interface has no return value (void) and is declared via the header file ara/com/com_error_domain.h.
Error Handling and Exception Safety
The signature is declared with noexcept(false) and specified as not exception-safe (not exception safe) ([SWS_CM_11333]), since throwing the exception is the primary purpose of the function. Specific DET or DEM reports are not defined for this call.
Boundary conditions and constraints
The central boundary condition is: If C++ exceptions are disabled in the compiler toolchain, the function does not participate in overload resolution according to [SWS_CORE_10304] ([SWS_CM_11333]). Interpretation: In software architectures with disabled exception handling, the function is therefore likely not callable at compile time. Question Q-437f825160e6801e (open)
gemini-3.8-flash-low· 2026-10-13 · German original