DEENESPTFRRUARHIKOZHNL

class ara::core::CoreErrorDomain

[SWS_CORE_05221] Upstream: RS_AP_00130

class CoreErrorDomain final :             public ErrorDomain {...};

An error domain for errors originating from the ara::core Functional Cluster.

Header-Datei#include "ara/core/core_error_domain.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core
Basisklasse(n)ErrorDomain
Unique IDAs per ara::core::CoreErrorDomain in [SWS_CORE_90023]

User GuideAI-GENERATED

Manages error codes of cluster ara::core, translates them into error messages, and throws corresponding exceptions.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8500dff6850e Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Manages error codes of cluster ara::core, translates them into error messages, and throws corresponding exceptions.

The class ara::core::CoreErrorDomain represents the error domain for errors from functional cluster ara::core and maps numeric error codes to descriptive text messages [SWS_CORE_05243]. In addition, via ThrowAsException(), it enables the conversion of error codes into type-specific CoreException exceptions [SWS_CORE_05244]. Since all querying methods are thread-safe and constexpr-constructible, the domain is suitable for efficient cluster-wide use. If C++ exceptions are disabled in the toolchain, the exception method does not participate in overload resolution.

Context

The class ara::core::CoreErrorDomain represents the specific error domain for all error conditions that originate in functional cluster ara::core. It is defined as a final specialization of ErrorDomain, thereby preventing further derivation. Via method Name(), the class provides the unique short name of the domain [SWS_CORE_05242]. For consistent integration into the AUTOSAR error handling model, CoreErrorDomain defines central type aliases: as an alias, Errc directly refers to enumeration CoreErrc [SWS_CORE_05231], whereas Exception forms the alias for the associated base exception class CoreException [SWS_CORE_05232]. Key interaction partners include the generic error capsules of type ErrorCode, which hold a reference to the respective error domain, as well as executing components that diagnose or handle error conditions.

Lifecycle

The creation of a CoreErrorDomain is performed via the parameterless default constructor constexpr CoreErrorDomain() noexcept [SWS_CORE_05241]. Since the constructor is declared as constexpr and noexcept, the instance can already be created at compile time without allocation overhead or exception risk.

Interpretation: Since error domains in the AUTOSAR Adaptive standard are designed to be stateless and exclusively provide constant metadata as well as transformation logic, a global or static singleton instance that is accessed cluster-wide is likely to exist in the system. Question Q-7b4761bf124c5755 (open) The instance remains valid throughout the entire lifetime of the process. With respect to concurrency, the operations of the class are specified as thread-safe [SWS_CORE_05241], [SWS_CORE_05242], [SWS_CORE_05243], which permits concurrent queries from multiple parallel threads without additional synchronization measures.

Usage Path

During operation, CoreErrorDomain is primarily consulted by the runtime system or application code in two typical scenarios: for textual error inspection and for exception handling.

If an error has occurred, the associated text message can be queried via the member function Message() by passing the numeric error code [SWS_CORE_05243]. The specification bindingly ensures that this function never returns a null pointer (nullptr), so that the returned const char* can be safely used for diagnostic output or logging. If an error is not to be handled as a return value but propagated as a C++ exception, method ThrowAsException() serves this purpose [SWS_CORE_05244]. It accepts an instance of ErrorCode, instantiates the corresponding CoreException, and throws it into the current call stack.

Error text query and exception triggering via CoreErrorDomainApplicationCoreErrorDomainCoreExceptionMessage(errorCode)Textmeldung (never nullptr)Use Case: AusnahmebehandlungoptC++ Exceptions aktiviertThrowAsException(errorCode)wirft CoreException(errorCode)

Sequence diagram: Typical sequence for the translation of error codes and conditional triggering of exceptions. Sources: [SWS_CORE_05243], [SWS_CORE_05244]

Error Scenarios

Functions Name() and Message() as well as the constructor are declared as noexcept and classified as exception-safe [SWS_CORE_05241], [SWS_CORE_05242], [SWS_CORE_05243]. Even under error conditions, they do not throw exceptions and do not generate their own error codes.

In contrast, ThrowAsException() is explicitly annotated with noexcept(false) and marked as not exception-safe, since deterministically throwing an exception (of type CoreException) represents the primary task of this interface [SWS_CORE_05244]. A key architectural precondition applies: If C++ exceptions are disabled in the used toolchain or compiler settings, this function must not participate in overload resolution [SWS_CORE_05244]. This prevents compilation errors in system environments that follow the fault-tolerant embedded approach without C++ exception handling.

This guide was generated by an AI system based on specification R25-11.

Member map

Constructors and destructor

1

Type aliases

2

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__core__CoreErrorDomain113 CoreErrorDomain + CoreErrorDomain() + Message() + Name() + ThrowAsException() nara__core__ErrorDomain335 ErrorDomain nara__core__CoreErrorDomain113->nara__core__ErrorDomain335

Detail view

Select an entry in the outline.

Constructors and destructor

Default constructor

constexpr CoreErrorDomain () noexcept;

Methods

Message function

Translate an error code value into a text message

const char * Message (ErrorDomain::CodeType errorCode) const noexcept override;
Name function

Return the ApApplicationErrorDomain. shortName of this error domain

const char * Name () const noexcept override;

Throw the exception type corresponding to the given ErrorCode.

void ThrowAsException (const ErrorCode &errorCode) const noexcept(false) override;

Type aliases

Errc type alias

Alias for the error code value enumeration

using Errc = CoreErrc;
Exception type alias

Alias for the exception base class

Method documentation

function CoreErrorDomain [SWS_CORE_05241] Upstream: RS_AP_00130

constexpr CoreErrorDomain () noexcept;

Default constructor

Header-Datei#include "ara/core/core_error_domain.h"
Scopeclass ara::core::CoreErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_05241
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_05241@rel:R25-11#b295a3ea
Content hash
b295a3ea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_05241
Status: valid/unmigrated Version: rel:R25-11#3e485a80 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_05241@rel:R25-11#3e485a80
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b295a3ea2026-09-30
  • R19-11rel:R19-11#070db4fd2026-10-14
  • R20-11rel:R20-11#fbd86c322026-10-14
  • R21-11rel:R21-11#f39944522026-10-14
  • R22-11rel:R22-11#326fb7c62026-10-14
  • R23-11rel:R23-11#5f0eb25d2026-10-14
  • R24-11rel:R24-11#3e485a802026-10-14
  • R25-11rel:R25-11#3e485a802026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Message [SWS_CORE_05243] Upstream: RS_AP_00130

const char * Message (ErrorDomain::CodeType errorCode) const noexcept override;

Translate an error code value into a text message

Header-Datei#include "ara/core/core_error_domain.h"
Scopeclass ara::core::CoreErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errorCodethe error code value

Rückgabewert

TypBeschreibung
const char *the text message, never nullptr

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_05243
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_05243@rel:R25-11#09cacd33
Content hash
09cacd33
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_05243
Status: valid/unmigrated Version: rel:R25-11#00427b91 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_05243@rel:R25-11#00427b91
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#09cacd332026-09-30
  • R19-11rel:R19-11#d12bc2432026-10-14
  • R20-11rel:R20-11#2b2da89e2026-10-14
  • R21-11rel:R21-11#2b2da89e2026-10-14
  • R22-11rel:R22-11#73527d722026-10-14
  • R23-11rel:R23-11#17fa2fc82026-10-14
  • R24-11rel:R24-11#00427b912026-10-14
  • R25-11rel:R25-11#00427b912026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Name [SWS_CORE_05242] Upstream: RS_AP_00130

const char * Name () const noexcept override;

Return the ApApplicationErrorDomain. shortName of this error domain

Header-Datei#include "ara/core/core_error_domain.h"
Scopeclass ara::core::CoreErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
const char *As per ara::core::CoreErrorDomain in [SWS_CORE_90023]

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_05242
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_05242@rel:R25-11#d99ba583
Content hash
d99ba583
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_05242
Status: valid/unmigrated Version: rel:R25-11#1f57e0cc Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_05242@rel:R25-11#1f57e0cc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d99ba5832026-09-30
  • R19-11rel:R19-11#5d1f96f42026-10-14
  • R20-11rel:R20-11#4467617d2026-10-14
  • R21-11rel:R21-11#4467617d2026-10-14
  • R22-11rel:R22-11#11fc29042026-10-14
  • R23-11rel:R23-11#a9c4ef8a2026-10-14
  • R24-11rel:R24-11#347b7dd02026-10-14
  • R25-11rel:R25-11#1f57e0cc2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ThrowAsException [SWS_CORE_05244] Upstream: RS_AP_00130

void ThrowAsException (const ErrorCode &errorCode) const noexcept(false) override;

Throw the exception type corresponding to the given ErrorCode.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c5a4846a6615 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The member function ThrowAsException of class ara::core::CoreErrorDomain (defined in header ara/core/core_error_domain.h) serves to synchronously trigger a C++ exception based on a passed error code [SWS_CORE_05244]. As parameter, the function accepts a reference to a const instance of ErrorCode (const ErrorCode &errorCode) [SWS_CORE_05244]. The method has no return value, but directly throws an exception of type CoreException, which completely encapsulates the passed ErrorCode object [SWS_CORE_05244].

Regarding execution context, concurrency, and compiler conditions, the following requirements apply:

  • Thread safety: The function is specified as thread-safe (thread-safe) and can therefore be safely called from concurrent contexts [SWS_CORE_05244].
  • Exception safety: The behavior is formally classified as not exception safe (not exception safe), because the function is declared with noexcept(false) and throws an exception as intended [SWS_CORE_05244].
  • Compiler restriction: If C++ exceptions are disabled in the compiler toolchain, the method must not participate in overload resolution according to [SWS_CORE_10304] [SWS_CORE_05244].

In the architectural structure, the method overrides (override) the pure virtual base function ThrowAsException of the abstract class ara::core::ErrorDomain [SWS_CORE_00154]. In typical usage, the function is not called directly on the domain object, but is initiated via helper method ErrorCode::ThrowAsException(), which dynamically forwards the call via this->Domain().ThrowAsException(*this) to the responsible error domain [SWS_CORE_00519].

This usage note was generated by an AI based on the specification AUTOSAR Adaptive R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/core/core_error_domain.h"
Scopeclass ara::core::CoreErrorDomain
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errorCodethe ErrorCode instance

Rückgabewert

TypBeschreibung
None

Exceptions

CoreException an exception containing the given ErrorCode

Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain. As per [SWS_CORE_10304]

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_05244
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_05244@rel:R25-11#8be3b2f5
Content hash
8be3b2f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_05244
Status: valid/unmigrated Version: rel:R25-11#76549789 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_05244@rel:R25-11#76549789
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8be3b2f52026-09-30
  • R19-11rel:R19-11#98ba1eda2026-10-14
  • R20-11rel:R20-11#1103982a2026-10-14
  • R21-11rel:R21-11#52e0dd5c2026-10-14
  • R22-11rel:R22-11#5de8a1b22026-10-14
  • R23-11rel:R23-11#27770af82026-10-14
  • R24-11rel:R24-11#0c81b1e92026-10-14
  • R25-11rel:R25-11#765497892026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

Type alias documentation

type alias Errc [SWS_CORE_05231] Upstream: RS_AP_00130

using Errc = CoreErrc;

Alias for the error code value enumeration

Header-Datei#include "ara/core/core_error_domain.h"
Scopeclass ara::core::CoreErrorDomain
SymbolErrc

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_05231
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_05231@rel:R25-11#634f1492
Content hash
634f1492
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_05231
Status: valid/unmigrated Version: rel:R25-11#c33560a7 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_05231@rel:R25-11#c33560a7
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#634f14922026-09-30
  • R19-11rel:R19-11#37c73a1f2026-10-14
  • R20-11rel:R20-11#a73623902026-10-14
  • R21-11rel:R21-11#a73623902026-10-14
  • R22-11rel:R22-11#5b6e63892026-10-14
  • R23-11rel:R23-11#f478ff612026-10-14
  • R24-11rel:R24-11#c33560a72026-10-14
  • R25-11rel:R25-11#c33560a72026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

type alias Exception [SWS_CORE_05232] Upstream: RS_AP_00130

using Exception = CoreException;

Alias for the exception base class

Header-Datei#include "ara/core/core_error_domain.h"
Scopeclass ara::core::CoreErrorDomain
SymbolException

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_05232
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_05232@rel:R25-11#9c108ed5
Content hash
9c108ed5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_05232
Status: valid/unmigrated Version: rel:R25-11#5d1bfae3 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_05232@rel:R25-11#5d1bfae3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9c108ed52026-09-30
  • R19-11rel:R19-11#d33d63502026-10-14
  • R20-11rel:R20-11#907e01392026-10-14
  • R21-11rel:R21-11#907e01392026-10-14
  • R22-11rel:R22-11#3eaa58ca2026-10-14
  • R23-11rel:R23-11#bdda71cf2026-10-14
  • R24-11rel:R24-11#5d1bfae32026-10-14
  • R25-11rel:R25-11#5d1bfae32026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill