DEENESPTFRRUARHIKOZHNL

class ara::shwa::ErrorHandler

Diese Seite wurde vollständig KI-generiert auf Basis von SWS Safe Hardware Acceleration (R25-11) — kein offizieller AUTOSAR-Text und keine automatisch extrahierte API-Seite wie die übrigen Module. Als Interpretation gekennzeichnete Aussagen sind Schlussfolgerungen aus den Quellen.

[AP_SWS_SHWA_00501] wording not yet imported Upstream: RS_SHWA_00008

class ErrorHandler final {...};

Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.

Header-Datei#include "ara/shwa/error_handler.h"
Scopenamespace ara::shwa

User GuideAI-GENERATED

Serves for detecting and forwarding errors in the shwa module to an application-specific handling routine.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d10c8775782f Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves for detecting and forwarding errors in the shwa module to an application-specific handling routine.

The class serves for the central reception and forwarding of errors within the shwa module. Instances can exclusively be created via the static factory method, which provides the object in an exclusive pointer [AP_SWS_SHWA_00507]. Specific error codes are passed and processed via the error handling method [AP_SWS_SHWA_00508]. Because error handling is designed to be neither thread-safe nor exception-safe, the calling application must coordinate concurrent access externally.

Context

The class ara::shwa::ErrorHandler provides a specialized interface in the module shwa (Smart Hardware Actuator) for receiving and purposefully forwarding module-specific error states. As part of the AUTOSAR Adaptive Platform, it decouples the actual hardware and actuator logic from higher-level error handling strategies. The class is declared as final, which prevents derivation and enforces a firmly defined usage behavior.

Essential interaction partners of ara::shwa::ErrorHandler are:

  • The using application or platform component that manages the instance and triggers the handling method in case of an error.
  • The callback std::function<void(ara::core::ErrorCode)> registered upon creation, which executes the actual handling response at the application level.
  • The module-specific error domain represented by the type ara::shwa::ShwaErrorCode.

Lifecycle

The lifecycle of an instance of ara::shwa::ErrorHandler is subject to strict constraints regarding creation, copyability, and memory ownership. Regular construction via default constructors is precluded because the parameterless constructor is deleted [AP_SWS_SHWA_00502]. To ensure a clear identity and unambiguous responsibilities, the class definition prevents any copy and move operations:

The only way to instantiate is provided by the static factory method Create [AP_SWS_SHWA_00507]. This accepts the function object std::function<void(ara::core::ErrorCode)> and returns the result in the form of a ara::core::Result<std::unique_ptr<ErrorHandler>>. Through the std::unique_ptr, exclusive ownership of the object is transferred to the caller. The lifetime of the instance is thus directly bound to the lifetime of the smart pointer; upon its destruction, the ErrorHandler is also released.

Regarding concurrency, the creation method Create is specified as thread-safe (thread-safe) and exception-safe (exception safe) [AP_SWS_SHWA_00507]. In contrast, the operational error handling method HandleError is specified as neither thread-safe nor exception-safe [AP_SWS_SHWA_00508]. Concurrent access to the same instance must consequently be coordinated at the application level.

Usage Path

The typical flow when using ara::shwa::ErrorHandler includes initialization via the factory and subsequent error processing:

  1. Callback definition: The application defines a handling routine with the signature void(ara::core::ErrorCode).
  2. Creation: The application calls the static method Create and passes the callback function [AP_SWS_SHWA_00507]. After checking the ara::core::Result, the application takes over the std::unique_ptr<ErrorHandler>.
  3. Error signaling: If an error occurs during ongoing operation, the method HandleError is called on the instance with the corresponding ara::shwa::ShwaErrorCode [AP_SWS_SHWA_00508].
  4. Forwarding: The instance processes the error event; during this, the module-specific error code is internally presumably transformed into a ara::core::ErrorCode and transmitted to the registered callback function (interpretation). Question Q-4101388d317e1f5b (open)
Typical sequence of error handling with ErrorHandlerApplicationErrorHandlerHandler-CallbackUse Case: Instantiation via factoryCreate(handler)Result<std::unique_ptr<ErrorHandler>>Use Case: Operative FehlerbehandlungHandleError(errorCode)handler(coreErrorCode)ReturnReturn

Sequence diagram: Typical call order from instantiation to error handling. Sources: [AP_SWS_SHWA_00507], [AP_SWS_SHWA_00508]

Error Scenarios

When using the class, essential constraints and edge cases must be observed:

  • Failure of object creation: The specification identifies no standardized error codes for the factory method Create [AP_SWS_SHWA_00507]. Nevertheless, the method returns a ara::core::Result, so that any error conditions (such as insufficient memory) are likely reported via this result object (interpretation). Question Q-85c2140acfda8244 (open) Callers must therefore validate the Result prior to accessing the pointer.
  • Preconditions for error handling: A call to HandleError requires an intact instance and a valid ara::shwa::ShwaErrorCode [AP_SWS_SHWA_00508]. Because the method has no return value, errors within processing cannot be reported directly to the caller as a status code.
  • Lack of exception safety and thread safety: Because HandleError is declared as not thread-safe and not exception safe [AP_SWS_SHWA_00508], the calling environment must ensure that calls occur sequentially and that no unhandled exceptions propagate within the error handling.

This class guide is based on the AUTOSAR specification for the Adaptive Platform (Release R25-11) and was created automatically.

Member map

Constructors and destructor

1

Operators

1

Detail view

Select an entry in the outline.

Constructors and destructor

ErrorHandler function 3

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Overloads ErrorHandler 3
ErrorHandler ()=delete; AP_SWS_SHWA_00502
ErrorHandler (ErrorHandler &&)=delete; AP_SWS_SHWA_00505
ErrorHandler (ErrorHandler const &)=delete; AP_SWS_SHWA_00503

Methods

Create function

Erzeugt beziehungsweise liefert das in der Signatur beschriebene Objekt oder Ergebnis über den angegebenen Factory-Pfad.

static ara::core::Result< std::unique_ptr< ErrorHandler > > Create (std::function< void(ara::core::ErrorCode)> handler) noexcept;
HandleError function

Führt die in der Signatur definierte Fehlerdomänen- oder Fehlerbehandlungsoperation aus.

void HandleError (ara::shwa::ShwaErrorCode errorCode);

Operators

operator= function 2

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Overloads = 2
ErrorHandler & operator= (const ErrorHandler &)=delete; AP_SWS_SHWA_00504
ErrorHandler & operator= (ErrorHandler &&)=delete; AP_SWS_SHWA_00506

Details

function ErrorHandler [AP_SWS_SHWA_00502] Upstream: RS_SHWA_00008

ErrorHandler ()=delete;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::ErrorHandler

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00502
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00502@rel:R25-11#7fa5897f
Content hash
7fa5897f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00502
Status: valid/unmigrated Version: rel:R25-11#7fa5897f Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00502@rel:R25-11#7fa5897f
Point-in-Time History:
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 ErrorHandler [AP_SWS_SHWA_00505] Upstream: RS_SHWA_00008

ErrorHandler (ErrorHandler &&)=delete;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::ErrorHandler

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00505
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00505@rel:R25-11#419fe952
Content hash
419fe952
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00505
Status: valid/unmigrated Version: rel:R25-11#419fe952 Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00505@rel:R25-11#419fe952
Point-in-Time History:
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= [AP_SWS_SHWA_00504] Upstream: RS_SHWA_00008

ErrorHandler & operator= (const ErrorHandler &)=delete;

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Scopeclass ara::shwa::ErrorHandler

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00504
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00504@rel:R25-11#5a3dec6d
Content hash
5a3dec6d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00504
Status: valid/unmigrated Version: rel:R25-11#5a3dec6d Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00504@rel:R25-11#5a3dec6d
Point-in-Time History:
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= [AP_SWS_SHWA_00506] Upstream: RS_SHWA_00008

ErrorHandler & operator= (ErrorHandler &&)=delete;

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Scopeclass ara::shwa::ErrorHandler

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00506
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00506@rel:R25-11#e689a389
Content hash
e689a389
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00506
Status: valid/unmigrated Version: rel:R25-11#e689a389 Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00506@rel:R25-11#e689a389
Point-in-Time History:
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 ErrorHandler [AP_SWS_SHWA_00503] Upstream: RS_SHWA_00008

ErrorHandler (ErrorHandler const &)=delete;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::ErrorHandler

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00503
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00503@rel:R25-11#2aaa7f49
Content hash
2aaa7f49
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00503
Status: valid/unmigrated Version: rel:R25-11#2aaa7f49 Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00503@rel:R25-11#2aaa7f49
Point-in-Time History:
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 Create [AP_SWS_SHWA_00507] Upstream: RS_SHWA_00008, RS_SHWA_00007

static ara::core::Result< std::unique_ptr< ErrorHandler > > Create (std::function< void(ara::core::ErrorCode)> handler) noexcept;

Erzeugt beziehungsweise liefert das in der Signatur beschriebene Objekt oder Ergebnis über den angegebenen Factory-Pfad.

Scopeclass ara::shwa::ErrorHandler
Thread Safetythread-safe
Exception Safetyexception safe
ErrorsThis function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00507
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00507@rel:R25-11#49774b06
Content hash
49774b06
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00507
Status: valid/unmigrated Version: rel:R25-11#49774b06 Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00507@rel:R25-11#49774b06
Point-in-Time History:
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 HandleError [AP_SWS_SHWA_00508] Upstream: RS_SHWA_00008

void HandleError (ara::shwa::ShwaErrorCode errorCode);

Führt die in der Signatur definierte Fehlerdomänen- oder Fehlerbehandlungsoperation aus.

Scopeclass ara::shwa::ErrorHandler
Thread Safetynot thread-safe
Exception Safetynot exception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00508
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00508@rel:R25-11#b5172dde
Content hash
b5172dde
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00508
Status: valid/unmigrated Version: rel:R25-11#b5172dde Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00508@rel:R25-11#b5172dde
Point-in-Time History:
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