DEENESPTFRRUARHIKOZHNL

class ara::core::FutureException

[SWS_CORE_00411] Upstream: RS_AP_00130

class FutureException :           public Exception {...};

Exception type thrown by ara::core::Future and ara::core::Promise

Header-Datei#include "ara/core/future_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 errors during asynchronous operations with Future and Promise and encapsulates an error code.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4af39887de1d Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves as an exception type for errors during asynchronous operations with Future and Promise and encapsulates an error code.

The class ara::core::FutureException serves as a specific exception type that is thrown on errors in connection with ara::core::Future and ara::core::Promise [SWS_CORE_00412]. It encapsulates an ara::core::ErrorCode and is created via an explicit constructor [SWS_CORE_00412]. For safe use in asynchronous and concurrent environments, instantiation is specified as noexcept, thread-safe, and exception-safe [SWS_CORE_00412].

Context

Within module core, the class ara::core::FutureException functions as a dedicated exception type for asynchronous communication and synchronization primitives. In accordance with its intended purpose, this exception type is triggered by ara::core::Future as well as ara::core::Promise to signal error states in the context of asynchronous operations to the caller. Structurally, ara::core::FutureException derives from base class Exception and encapsulates a domain-specific error code.

In collaborative scenarios, ara::core::FutureException forms the bridge between the producing asynchronous endpoint (such as ara::core::Promise), the consuming endpoint (ara::core::Future), and application-side error handling. The interaction of these three participants illustrates the structural framework in which the exception is passed for error handling.

FutureExceptionKontext Promise ara::core::Promise Exception ara::core::FutureException Promise->Exception triggers / sets Future ara::core::Future Future->Exception throws on error AppThread Anwendungs-Thread Future->AppThread benachrichtigt Exception->AppThread is caught by

Context diagram: Embedding of ara::core::FutureException between Promise, Future, and the application thread. Sources: [SWS_CORE_00412]

Lifecycle

The instantiation of ara::core::FutureException takes place explicitly via the constructor by passing an error code of type ara::core::ErrorCode [SWS_CORE_00412]. Declaration with explicit prevents implicit type conversion from an ara::core::ErrorCode. The constructor is designated as noexcept, ensuring that construction itself cannot throw further exceptions [SWS_CORE_00412].

Regarding execution safety, the class is specified as exception safe [SWS_CORE_00412]. For concurrent operation, the specification also explicitly identifies construction as thread-safe [SWS_CORE_00412]. This permits asynchronous operations to safely instantiate the exception across thread boundaries and pass it to waiting recipients.

Usage Path

The typical usage sequence encompasses the occurrence of an error during an asynchronous operation up to the catching of the exception by the consuming caller. Provision is typically made via header ara/core/future_error_domain.h [SWS_CORE_00412].

Error signaling via ara::core::FutureExceptionErzeuger (Promise)Vermittler (Future)Receiver (thread)Use Case: Error detection and instantiationAsynchronous error occursErrorCode is providedFehlerzustand setzenFutureException(err)Use Case: Retrieval and exception handlingErgebnis anfordernwirft FutureExceptioncatch (FutureException&)ErrorCode auswerten

Sequence diagram: Flow from error occurrence via instantiation of ara::core::FutureException to catching. Sources: [SWS_CORE_00412]

The usage sequence is divided into the following steps:

  • Detection of a failure or an impermissible state during asynchronous processing in connection with ara::core::Promise or ara::core::Future.
  • Creation of ara::core::FutureException using the constructor specifying the specific ara::core::ErrorCode [SWS_CORE_00412].
  • Transmission of the exception to the consuming thread, where it is caught within a try-catch block and the contained error is analyzed.

Error Scenarios

Since ara::core::FutureException itself represents the vehicle for error signaling, error scenarios are limited to the conditions of its own creation. Because the constructor is marked with noexcept, it is guaranteed that no execution error in the form of a secondary exception can occur during object creation [SWS_CORE_00412]. Passing a valid object of type ara::core::ErrorCode as a parameter is considered a precondition for construction err [SWS_CORE_00412]. If an error occurs when working with ara::core::Future or ara::core::Promise, the exception serves the purpose of transporting this error code unchanged to higher-level callers.

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

UML class diagram

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

G nara__core__FutureException511 FutureException + FutureException() nara__core__Exception792 Exception nara__core__FutureException511->nara__core__Exception792 nstd__exception10 std::exception nara__core__Exception792->nstd__exception10

Constructors and destructor

Construct a new ara::core::FutureException from an ara::core::ErrorCode

explicit FutureException (ErrorCode err) noexcept;

Method documentation

function FutureException [SWS_CORE_00412] Upstream: RS_AP_00130

explicit FutureException (ErrorCode err) noexcept;
Header-Datei#include "ara/core/future_error_domain.h"
Scopeclass ara::core::FutureException
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errthe ara::core::ErrorCode

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

Record
AUTOSAR/AP/record/SWS_CORE_00412
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00412@rel:R25-11#38add4ec
Content hash
38add4ec
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00412
Status: valid/unmigrated Version: rel:R25-11#8d00af34 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_00412@rel:R25-11#8d00af34
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#38add4ec2026-09-30
  • R19-11rel:R19-11#85d2e6d42026-10-14
  • R20-11rel:R20-11#0ed7c8232026-10-14
  • R21-11rel:R21-11#0ed7c8232026-10-14
  • R22-11rel:R22-11#f9ed1ff42026-10-14
  • R23-11rel:R23-11#3515d8022026-10-14
  • R24-11rel:R24-11#7b05c81d2026-10-14
  • R25-11rel:R25-11#8d00af342026-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