DEENESPTFRRUARHIKOZHNL

class ara::exec::ExecException

[SWS_EM_02282] Upstream: RS_AP_00130, RS_AP_00122, RS_AP_00127, RS_AP_00154, RS_AP_00150, RS_AP_00140

class ExecException final :          public ara::core::Exception {...};

Defines a class for exceptions to be thrown by the Execution Management.

Header-Datei#include "ara/exec/exec_error_domain.h"
Forwarding-Header#include "ara/exec/exec_fwd.h"
Scopenamespace ara::exec
Basisklasse(n)ara::core::Exception

User GuideAI-GENERATED

Encapsulates error codes of Execution Management as a C++ exception for synchronous error handling.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e102ca6cc8ed Provenance Open questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Encapsulates error codes of Execution Management as a C++ exception for synchronous error handling.

The class ara::exec::ExecException serves as a final exception class of Execution Management for encapsulating and signaling module-specific errors via the C++ exception mechanism. In the event of an error, instances are created and thrown via the thread-safe constructor by specifying a ara::core::ErrorCode, whereupon calling sites catch and analyze them [SWS_EM_02283]. As a fundamental constraint, construction is specified as noexcept, whereby object creation is guaranteed to remain exception-safe [SWS_EM_02283]. Unhandled exceptions must be avoided, as they lead to system termination.

Context

The class ara::exec::ExecException represents the central exception class of the module Execution Management (exec) within the AUTOSAR Adaptive Platform. According to its specification, it serves as an encapsulation for exceptions thrown by Execution Management. The class declaration defines it as final with public derivation from the standard base exception class ara::core::Exception, thereby embedding it seamlessly into the uniform exception and error handling concept of the Adaptive Platform. Further specialization or subclassing is precluded by the identifier final.

The exception class is declared in header #include "ara/exec/exec_error_domain.h" [SWS_EM_02283]. The primary functional responsibility of ara::exec::ExecException lies in transporting module-specific error states via the C++ exception mechanism. Interpretation: Throwing this exception is likely to come into play primarily in execution environments in which error states of Execution Management are not propagated purely via value-based error types, but where a synchronous control flow abort via C++ exceptions is required. Question Q-8faec8c282524965 (open)

Lifecycle

The lifecycle of an instance of ara::exec::ExecException begins with explicit construction passing an error code. The constructor explicit ExecException(ara::core::ErrorCode errorCode) noexcept creates a new exception object encapsulating the passed error code [SWS_EM_02283]. The designation as noexcept ensures that the object creation itself is guaranteed to remain failure-free even in the context of an already existing error handling and does not trigger cascading secondary errors [SWS_EM_02283].

With regard to execution safety, construction is explicitly classified as exception-safe ("exception safe") and thread-safe ("thread-safe") [SWS_EM_02283]. This enables the reliable creation of exception instances across different threads without requiring additional synchronization mechanisms. After being thrown via throw, the object transitions to the management of the C++ runtime system. Interpretation: Destruction of the exception object occurs automatically after exiting the handling catch block as part of regular stack unwinding, which is why no explicit lifecycle management by the caller is necessary. Question Q-ec22ad5f177555aa (open)

Usage Path

A typical usage path of ara::exec::ExecException includes instantiation in case of error within Execution Management as well as controlled catching in the calling application context:

  • Error identification and instantiation: If an exceptional condition occurs in Execution Management, the cause is mapped to an ara::core::ErrorCode of the associated error domain and used for explicit initialization of an ara::exec::ExecException [SWS_EM_02283].
  • Signaling: The initialized exception instance is thrown, interrupting the regular execution path and initiating stack unwinding.
  • Catching: Calling components catch the exception object either specifically as const ara::exec::ExecException& or more generally via the polymorphic base class const ara::core::Exception&.
  • Evaluation: Interpretation: Since the object was constructed with an ara::core::ErrorCode [SWS_EM_02283] and inherits from ara::core::Exception, the receiver is likely to extract the contained error code via interfaces of the base class in order to perform module-specific recovery or logging measures. Question Q-d4671c34f5aab6f9 (open)

Error Scenarios

As a specialized exception class, ara::exec::ExecException is designed to map existing error situations without inducing new errors during its own usage. For creation, the constructor requires passing an ara::core::ErrorCode [SWS_EM_02283]. Since the constructor is declared as noexcept, precondition errors during instantiation that could hinder the creation of the exception object are ruled out [SWS_EM_02283].

A key error scenario at the system level lies in the incomplete catching of thrown exceptions. If an exception triggered by ara::exec::ExecException remains unhandled along the call hierarchy, the standard C++ runtime handling takes effect, which typically results in a call to std::terminate and thus in premature process termination. Interacting software components must therefore ensure that calls to potentially throwing functions of Execution Management are safeguarded by adequate try-catch blocks.

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

UML class diagram

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

G nara__exec__ExecException556 ExecException + ExecException() nara__core__Exception792 Exception nara__exec__ExecException556->nara__core__Exception792 nstd__exception10 std::exception nara__core__Exception792->nstd__exception10

Constructors and destructor

ExecException function

Constructs a new ExecException object containing an error code.

explicit ExecException (ara::core::ErrorCode errorCode) noexcept;

Method documentation

function ExecException [SWS_EM_02283] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130, RS_AP_00159

explicit ExecException (ara::core::ErrorCode errorCode) noexcept;

Constructs a new ExecException object containing an error code.

Header-Datei#include "ara/exec/exec_error_domain.h"
Scopeclass ara::exec::ExecException
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errorCodeThe error code.

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

Record
AUTOSAR/AP/record/SWS_EM_02283
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02283@rel:R25-11#7afdb8d9
Content hash
7afdb8d9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02283
Status: valid/unmigrated Version: rel:R25-11#f57f2491 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_EM_02283@rel:R25-11#f57f2491
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7afdb8d92026-09-30
  • R19-11rel:R19-11#5683c5ea2026-10-14
  • R20-11rel:R20-11#1a1c4d242026-10-14
  • R21-11rel:R21-11#1a1c4d242026-10-14
  • R22-11rel:R22-11#49bf1b972026-10-14
  • R23-11rel:R23-11#4052ff1d2026-10-14
  • R24-11rel:R24-11#8fa7f4222026-10-14
  • R25-11rel:R25-11#f57f24912026-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