DEENESPTFRRUARHIKOZHNL

class ara::core::CoreException

[SWS_CORE_05211] Upstream: RS_AP_00130

class CoreException :            public Exception {...};

Exception type thrown for ara::core errors.

Header-Datei#include "ara/core/core_error_domain.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core
Basisklasse(n)Exception

User GuideAI-GENERATED

Serves as an exception type for reporting core errors and encapsulates an error code for structured exception handling.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 2b622ea04d25 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves as an exception type for reporting core errors and encapsulates an error code for structured exception handling.

The class ara::core::CoreException serves as a central exception type for conveying errors from the functional area ara::core and derives from base class Exception for this purpose. Instantiation is mandatory via the constructor by passing a specific ErrorCode that encapsulates the cause of the error [SWS_CORE_05212]. As an essential constraint, the implementation guarantees full thread safety and exception safety as well as an exception-free noexcept guarantee upon creation [SWS_CORE_05212]. Callers catch the exception to handle the contained error state in a controlled manner.

Context

The class ara::core::CoreException serves as a central exception type for errors that occur within the functional area ara::core. According to the class declaration, it publicly derives from base class Exception. The essential task of CoreException is to transfer an occurred error event, described by an ErrorCode object, into the C++ exception handling model. In the platform context, the class thus acts as a bridge between the error-detecting infrastructure component and the calling application or platform code. If an operation in ara::core fails and the interface provides for an exception, CoreException is instantiated and signaled. In doing so, the constructor accepts a concrete object of type [SWS_CORE_05212] according to ErrorCode, which encapsulates the domain-specific cause and domain of the occurred error. Embedding in the class hierarchy allows higher architectural layers to catch errors either specifically as CoreException or to handle them generically via base class Exception.

ErrorCode ErrorCode CoreException CoreException ErrorCode->CoreException initialisiert Exception Exception CoreException->Exception erbt von

Context diagram: Relationship of CoreException to ErrorCode and base class Exception. Sources: [SWS_CORE_05212]

Lifecycle

The lifecycle of an instance of CoreException begins in the context of error detection. Creation takes place via the constructor explicit CoreException(ErrorCode err) noexcept according to [SWS_CORE_05212]. The keyword explicit prevents implicit conversion from an ErrorCode, forcing deliberate object creation. An essential characteristic of construction is the specification as noexcept [SWS_CORE_05212]: Instantiation itself cannot throw further exceptions, ensuring reliable exception creation even in critical system states. In addition, exception safety is classified as completely safe (exception safe), and the operation is considered thread-safe (thread-safe) [SWS_CORE_05212]. After creation, the exception object is typically passed on via throw. During stack unwinding, the exception is transported until it is bound by a matching exception handler. The lifecycle ends when exiting the catching block, whereupon the destruction of the exception object is carried out deterministically.

Usage Path

The regular usage path of CoreException is divided into three consecutive phases: diagnosis, throw, and catch. First, a component of module core identifies a deviation from nominal behavior and instantiates a corresponding ErrorCode. The exception is then created by calling constructor CoreException(err) [SWS_CORE_05212]. Immediately thereafter, the object is thrown into the execution context. At user level, the call is executed in a protected block. If the exceptional case occurs, a catch block catches the instance—typically as a const reference to CoreException or polymorphically via base class Exception. In the handler, the error can be analyzed, logged, or remediated. Since header file #include "ara/core/core_error_domain.h" is prescribed according to [SWS_CORE_05212], the class declaration is consistently available for application modules.

Error Scenarios

In the area of error scenarios, CoreException itself serves as a signal carrier and throws no secondary errors during its own creation. Because the constructor is declared as noexcept [SWS_CORE_05212], the scenario of a construction failure is excluded. The specification guarantees strict exception safety and thread safety [SWS_CORE_05212], so that concurrent access during creation also remains safe. A critical error scenario arises at system level when a thrown CoreException is not caught by any higher-level scope, which in standard C++ is expected to lead to a call of std::terminate. Question Q-492683ca01bebc7d (open) Developers must therefore ensure that calls to potentially throwing ara::core functions are embedded in suitable exception handling blocks. A further potential scenario concerns forwarding across component boundaries, where the contained ErrorCode must be interpreted correctly in order to initiate adequate remediation measures.

This guide was generated by an AI curation assistant based on AUTOSAR R25-11.

UML class diagram

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

G nara__core__CoreException713 CoreException + CoreException() nara__core__Exception792 Exception nara__core__CoreException713->nara__core__Exception792 nstd__exception10 std::exception nara__core__Exception792->nstd__exception10

Constructors and destructor

CoreException function

Construct a new CoreException from an ErrorCode.

explicit CoreException (ErrorCode err) noexcept;

Method documentation

function CoreException [SWS_CORE_05212] Upstream: RS_AP_00130

explicit CoreException (ErrorCode err) noexcept;

Construct a new CoreException from an ErrorCode.

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

Parameter (in)

ParameterBeschreibung
errthe ErrorCode

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

Record
AUTOSAR/AP/record/SWS_CORE_05212
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_05212@rel:R25-11#89d8f392
Content hash
89d8f392
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_05212
Status: valid/unmigrated Version: rel:R25-11#fcccf313 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_05212@rel:R25-11#fcccf313
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#89d8f3922026-09-30
  • R19-11rel:R19-11#7047abf42026-10-14
  • R20-11rel:R20-11#69aba1672026-10-14
  • R21-11rel:R21-11#69aba1672026-10-14
  • R22-11rel:R22-11#7a696c932026-10-14
  • R23-11rel:R23-11#cc26b8992026-10-14
  • R24-11rel:R24-11#fcccf3132026-10-14
  • R25-11rel:R25-11#fcccf3132026-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