DEENESPTFRRUARHIKOZHNL

class ara::core::Exception

[SWS_CORE_00601] Upstream: RS_AP_00130

class Exception :        public exception {...};

Base type for all ARA exception types

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

User GuideAI-GENERATED

Serves as the base class for all AUTOSAR exceptions and encapsulates a thread-safe error code for evaluation.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d4eaa8466f70 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves as the base class for all AUTOSAR exceptions and encapsulates a thread-safe error code for evaluation.

The class ara::core::Exception serves as a common base class for all exception types of the Adaptive Platform and embeds an ErrorCode into the standardized C++ exception hierarchy [SWS_CORE_00611]. When errors occur, it transports this error code in a thread-safe manner to a handler that can evaluate it via Error() or the derived standard method what() [SWS_CORE_00613]. All operations are strictly exception-safe and declared as noexcept. To prevent accidental object slicing with derived types, copy operations are protected.

Context

The class ara::core::Exception serves as a common base class for all exception types within the AUTOSAR Adaptive Platform. It bridges exception handling of the C++ standard library and the AUTOSAR error model: on the one hand, it publicly derives from std::exception and overrides its virtual member function what() [SWS_CORE_00612]; on the other hand, it transports an embedded error object of type ara::core::ErrorCode [SWS_CORE_00611], [SWS_CORE_00613].

The main responsibility of ara::core::Exception is to provide structured error information across call boundaries in exceptional cases. Interpretation: The class is likely designed as a common root for domain-specific exception classes of the platform; its copy operations are specified as protected to prevent accidental object slicing for derived instances [SWS_CORE_00614], [SWS_CORE_00618]. Question Q-20ffec7888b9e724 (open)

Kontext ara::core::ErrorCode ara::core::ErrorCode ara::core::Exception ara::core::Exception ara::core::ErrorCode->ara::core::Exception eingebettet in std::exception std::exception ara::core::Exception->std::exception erbt von Abgeleitete_Exception Abgeleitete_Exception Abgeleitete_Exception->ara::core::Exception erbt von

Context diagram: Embedding of ara::core::Exception between std::exception, the encapsulated ErrorCode, and derived classes. Sources: [SWS_CORE_00611], [SWS_CORE_00612], [SWS_CORE_00614], [SWS_CORE_00618].

Lifecycle

Creating an ara::core::Exception strictly requires explicitly specifying an error code when calling constructor [SWS_CORE_00611]. This constructor is defined as noexcept and thus does not throw any exceptions itself.

Ownership and copying options follow strict protection rules: both the copy constructor [SWS_CORE_00618] and the copy assignment operator [SWS_CORE_00614] have the access modifier protected. This prevents polymorphic subclasses from being copied incompletely via base class interfaces. For the transfer of resources, on the other hand, the move constructor [SWS_CORE_00615] and the move assignment operator with reference qualifier & [SWS_CORE_00616] are publicly available as noexcept=default.

Destruction takes place deterministically via the virtual destructor [SWS_CORE_00617], which is specified as noexcept override=default and ensures the proper cleanup of derived instances. Concurrent read accesses to the methods as well as instantiation are designated as thread-safe [SWS_CORE_00611], [SWS_CORE_00612], [SWS_CORE_00613].

Usage Path

The regular sequence extends from error detection and raising the exception to structured diagnostics in the exception handler:

  • Creation and throwing: A component detects an error condition, instantiates the exception with the appropriate ErrorCode [SWS_CORE_00611], and throws the object via throw.
  • Catching: A higher-level block catches the object by reference (for example as const ara::core::Exception& or polymorphically as const std::exception&).
  • Standardized text output: A textual explanation can be obtained as a null-terminated string via what() [SWS_CORE_00612]. All lifetime guarantees of std::exception::what remain fully preserved.
  • Detailed error inspection: Via the member function Error(), the handler accesses a const reference to the embedded ErrorCode [SWS_CORE_00613] in order to evaluate system-specific error domains and codes automatically.
Instantiation and error query for ara::core::ExceptionFehlerstelleara::core::Exceptionerror handlingException(err)throwwhat()const char*Error()const ErrorCode&

Sequence diagram: Typical call sequence from instantiation to error query. Sources: [SWS_CORE_00611], [SWS_CORE_00612], [SWS_CORE_00613].

Error Scenarios

Because ara::core::Exception itself represents the carrier object for error states, all operations are designed for maximum resilience:

This guide is based on the specification AUTOSAR Adaptive Platform Release R25-11.

Member map

Constructors and destructor

2

Methods

2

Operators

1

Class diagram

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

G nara__core__Exception792 Exception + Exception() + operator=() + ~Exception() + Error() + what() nstd__exception10 std::exception nara__core__Exception792->nstd__exception10 napext__com__secoc__ComSecOcFvmException158 ComSecOcFvmException napext__com__secoc__ComSecOcFvmException158->nara__core__Exception792 napext__tsync__TsyncFvmException780 TsyncFvmException napext__tsync__TsyncFvmException780->nara__core__Exception792 nara__com__ComException152 ComException nara__com__ComException152->nara__core__Exception792 nara__com__e2e__ComE2EException703 ComE2EException nara__com__e2e__ComE2EException703->nara__core__Exception792 nara__core__CoreException713 CoreException nara__core__CoreException713->nara__core__Exception792 nara__core__FutureException511 FutureException nara__core__FutureException511->nara__core__Exception792 nara__crypto__CryptoException764 CryptoException nara__crypto__CryptoException764->nara__core__Exception792 nara__diag__DiagException942 DiagException nara__diag__DiagException942->nara__core__Exception792 nara__diag__DiagOfferException442 DiagOfferException nara__diag__DiagOfferException442->nara__core__Exception792 nara__diag__DiagReportingException911 DiagReportingException nara__diag__DiagReportingException911->nara__core__Exception792 nara__diag__DiagSovdException335 DiagSovdException nara__diag__DiagSovdException335->nara__core__Exception792 nara__diag__DiagUdsNrcException343 DiagUdsNrcException nara__diag__DiagUdsNrcException343->nara__core__Exception792 nara__exec__ExecException556 ExecException nara__exec__ExecException556->nara__core__Exception792 nara__per__PerException768 PerException nara__per__PerException768->nara__core__Exception792 nara__phm__PhmException101 PhmException nara__phm__PhmException101->nara__core__Exception792 nara__sm__SmException872 SmException nara__sm__SmException872->nara__core__Exception792 nara__tsync__TsyncException184 TsyncException nara__tsync__TsyncException184->nara__core__Exception792

Detail view

Select an entry in the outline.

Constructors and destructor

Exception function 3

Construct a new Exception object with a specific ErrorCode

Overloads Exception 3
explicit Exception (ErrorCode err) noexcept; SWS_CORE_00611
Exception (Exception &&other) noexcept=default; SWS_CORE_00615
Exception (const Exception &other) noexcept=default; SWS_CORE_00618
~Exception function

Destructor

~Exception () noexcept override=default;

Methods

Error function

Return the embedded ErrorCode that was given to the constructor

const ErrorCode & Error () const noexcept;
what function

Return the explanatory string. This function overrides the virtual function std::exception:: what. All guarantees about the lifetime of the returned pointer that are given for std::exception::what are preserved. ≙ std::exception::

const char * what () const noexcept override;

Operators

operator= function 2

Copy assignment operator

Overloads = 2
Exception & operator= (const Exception &other) noexcept=default; SWS_CORE_00614
Exception & operator= (Exception &&other) & noexcept=default; SWS_CORE_00616

Method documentation

function Error [SWS_CORE_00613] Upstream: RS_AP_00130

const ErrorCode & Error () const noexcept;

Return the embedded ErrorCode that was given to the constructor

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

Rückgabewert

TypBeschreibung
const ErrorCode &reference to the embedded ErrorCode

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

Record
AUTOSAR/AP/record/SWS_CORE_00613
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00613@rel:R25-11#427b8816
Content hash
427b8816
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00613
Status: valid/unmigrated Version: rel:R25-11#768fb30b 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_00613@rel:R25-11#768fb30b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#427b88162026-09-30
  • R19-11rel:R19-11#11313e132026-10-14
  • R20-11rel:R20-11#60c96c392026-10-14
  • R21-11rel:R21-11#51ca3dce2026-10-14
  • R22-11rel:R22-11#04096f212026-10-14
  • R23-11rel:R23-11#e6cdb2be2026-10-14
  • R24-11rel:R24-11#538a90522026-10-14
  • R25-11rel:R25-11#768fb30b2026-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 Exception [SWS_CORE_00611] Upstream: RS_AP_00130

explicit Exception (ErrorCode err) noexcept;

Construct a new Exception object with a specific ErrorCode

Header-Datei#include "ara/core/exception.h"
Scopeclass ara::core::Exception
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_00611
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00611@rel:R25-11#eb72a763
Content hash
eb72a763
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00611
Status: valid/unmigrated Version: rel:R25-11#4a7f399f 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_00611@rel:R25-11#4a7f399f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#eb72a7632026-09-30
  • R19-11rel:R19-11#94d626ce2026-10-14
  • R20-11rel:R20-11#ac6eb9352026-10-14
  • R21-11rel:R21-11#2f59dd412026-10-14
  • R22-11rel:R22-11#211731882026-10-14
  • R23-11rel:R23-11#cf9a6fa22026-10-14
  • R24-11rel:R24-11#d3d5d4b82026-10-14
  • R25-11rel:R25-11#4a7f399f2026-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 Exception [SWS_CORE_00615] Upstream: RS_AP_00130

Exception (Exception &&other) noexcept=default;

Move constructor

Header-Datei#include "ara/core/exception.h"
Scopeclass ara::core::Exception
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherthe other instance to move from

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

Record
AUTOSAR/AP/record/SWS_CORE_00615
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00615@rel:R25-11#2fbd2fce
Content hash
2fbd2fce
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00615
Status: valid/unmigrated Version: rel:R25-11#430cfd8b Versionshistorie & Revisions (1 transition, 5 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_00615@rel:R25-11#430cfd8b
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#2fbd2fce2026-09-30
  • R22-11rel:R22-11#095dd28c2026-10-14
  • R23-11rel:R23-11#a22844c12026-10-14
  • R24-11rel:R24-11#c20d19892026-10-14
  • R25-11rel:R25-11#430cfd8b2026-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 Exception [SWS_CORE_00618] Upstream: RS_AP_00130

Exception (const Exception &other) noexcept=default;

Copy constructor

Header-Datei#include "ara/core/exception.h"
Scopeclass ara::core::Exception
Exception-Sicherheitexception safe
Sichtbarkeitprotected

Parameter (in)

ParameterBeschreibung
otherthe other instance
Hinweise: This function has protected access specifier in order to prevent some opportunities for accidental object slicing

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

Record
AUTOSAR/AP/record/SWS_CORE_00618
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00618@rel:R25-11#f169ce04
Content hash
f169ce04
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00618
Status: valid/unmigrated Version: rel:R25-11#96699454 Versionshistorie & Revisions (1 transition, 5 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_00618@rel:R25-11#96699454
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#f169ce042026-09-30
  • R22-11rel:R22-11#475a09972026-10-14
  • R23-11rel:R23-11#c7c458632026-10-14
  • R24-11rel:R24-11#03f9f8d22026-10-14
  • R25-11rel:R25-11#966994542026-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 operator= [SWS_CORE_00614] Upstream: RS_AP_00130

Exception & operator= (const Exception &other) noexcept=default;

Copy assignment operator

Header-Datei#include "ara/core/exception.h"
Scopeclass ara::core::Exception
Exception-Sicherheitexception safe
Sichtbarkeitprotected

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Exception &*this
Hinweise: This function has protected access specifier in order to prevent some opportunities for accidental object slicing

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

Record
AUTOSAR/AP/record/SWS_CORE_00614
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00614@rel:R25-11#63a7a2e5
Content hash
63a7a2e5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00614
Status: valid/unmigrated Version: rel:R25-11#0a81f511 Versionshistorie & Revisions (1 transition, 7 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_00614@rel:R25-11#0a81f511
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#63a7a2e52026-09-30
  • R20-11rel:R20-11#1ef5644f2026-10-14
  • R21-11rel:R21-11#1ef5644f2026-10-14
  • R22-11rel:R22-11#4036011d2026-10-14
  • R23-11rel:R23-11#0996bea22026-10-14
  • R24-11rel:R24-11#ad63d8312026-10-14
  • R25-11rel:R25-11#0a81f5112026-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 operator= [SWS_CORE_00616] Upstream: RS_AP_00130

Exception & operator= (Exception &&other) & noexcept=default;

Move assignment operator

Header-Datei#include "ara/core/exception.h"
Scopeclass ara::core::Exception
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherthe other instance to move from

Rückgabewert

TypBeschreibung
Exception &*this

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

Record
AUTOSAR/AP/record/SWS_CORE_00616
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00616@rel:R25-11#cf7be040
Content hash
cf7be040
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00616
Status: valid/unmigrated Version: rel:R25-11#eb8d2ad7 Versionshistorie & Revisions (1 transition, 5 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_00616@rel:R25-11#eb8d2ad7
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#cf7be0402026-09-30
  • R22-11rel:R22-11#62dd53c82026-10-14
  • R23-11rel:R23-11#16771f172026-10-14
  • R24-11rel:R24-11#03c97c992026-10-14
  • R25-11rel:R25-11#eb8d2ad72026-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 what [SWS_CORE_00612] Upstream: RS_AP_00130

const char * what () const noexcept override;

Return the explanatory string. This function overrides the virtual function std::exception:: what. All guarantees about the lifetime of the returned pointer that are given for std::exception::what are preserved.

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

The member function what of class ara::core::Exception is used for synchronously retrieving an explanatory string regarding the occurred error [SWS_CORE_00612]. It overrides the virtual function std::exception::what and returns a pointer to a null-terminated string (const char*) [SWS_CORE_00612].

Usage and lifetime

The function expects no input parameters. With regard to the validity of the returned pointer, all guarantees that apply to std::exception::what are preserved [SWS_CORE_00612]. To be able to use the function, the header file ara/core/exception.h must be included [SWS_CORE_00612].

Error Handling and Concurrency

  • Exception safety: The operation is declared as noexcept and specified as exception-safe (exception safe); it throws no exceptions itself [SWS_CORE_00612].
  • Concurrency: The execution is specified as thread-safe (thread-safe) [SWS_CORE_00612]. Calls can thus safely be made from parallel threads.

This usage note was generated automatically.

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

Rückgabewert

TypBeschreibung
const char *a null-terminated string

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

Record
AUTOSAR/AP/record/SWS_CORE_00612
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00612@rel:R25-11#b339be86
Content hash
b339be86
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00612
Status: valid/unmigrated Version: rel:R25-11#4dc7ac4e 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_00612@rel:R25-11#4dc7ac4e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b339be862026-09-30
  • R19-11rel:R19-11#c863b8c62026-10-14
  • R20-11rel:R20-11#ef5213282026-10-14
  • R21-11rel:R21-11#ef5213282026-10-14
  • R22-11rel:R22-11#35f8a78d2026-10-14
  • R23-11rel:R23-11#0d1482f32026-10-14
  • R24-11rel:R24-11#260c2d462026-10-14
  • R25-11rel:R25-11#4dc7ac4e2026-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 ~Exception [SWS_CORE_00617] Upstream: RS_AP_00130, RS_AP_00145

~Exception () noexcept override=default;

Destructor

Header-Datei#include "ara/core/exception.h"
Scopeclass ara::core::Exception
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_00617
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00617@rel:R25-11#6ae22c3b
Content hash
6ae22c3b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00617
Status: valid/unmigrated Version: rel:R25-11#f3733454 Versionshistorie & Revisions (1 transition, 5 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_00617@rel:R25-11#f3733454
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#6ae22c3b2026-09-30
  • R22-11rel:R22-11#c4c5573b2026-10-14
  • R23-11rel:R23-11#08d2767c2026-10-14
  • R24-11rel:R24-11#8a264f6d2026-10-14
  • R25-11rel:R25-11#f37334542026-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