DEENESPTFRRUARHIKOZHNL

class ara::per::PerException

[SWS_PER_00354] Upstream: RS_AP_00122, RS_AP_00127

class PerException :            public ara::core::Exception {...};

Exception type thrown by Persistency.

Header-Datei#include "ara/per/per_error_domain.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
Basisklasse(n)ara::core::Exception

User GuideAI-GENERATED

Serves to encapsulate and signal errors from the persistence module based on a specific error code.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: abab05ca22f0 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves to encapsulate and signal errors from the persistence module based on a specific error code.

The class ara::per::PerException serves in the AUTOSAR Adaptive Platform as a specific exception type for signaling errors from the persistence module. It is provided via header ara/per/per_error_domain.h and inherits from base class ara::core::Exception [SWS_PER_00355]. Instantiation takes place explicitly by passing an ara::core::ErrorCode, which encapsulates the concrete error cause. By declaring the constructor as noexcept, creation is specified as completely exception-safe as well as thread-safe [SWS_PER_00355].

Context

The class ara::per::PerException acts as the central, specialized exception type for the functional cluster of persistence (module per) within the AUTOSAR Adaptive Platform in release R25-11. According to its formal syntax, the class is publicly derived from the general base exception ara::core::Exception. Its primary responsibility is to signal severe error states, or those not directly handleable via regular return values, from the persistence subsystem to higher-level application layers. The class is defined in header ara/per/per_error_domain.h [SWS_PER_00355]. In the architecture, it interacts closely with the platform's error handling infrastructure, with each instance transporting an ara::core::ErrorCode for precise error diagnosis [SWS_PER_00355].

Lifecycle

The lifecycle of an ara::per::PerException object is directly tied to the detection and propagation of an error within persistence operations. Instantiation takes place via an explicit constructor that accepts exactly one parameter of type ara::core::ErrorCode [SWS_PER_00355]. This constructor is declared as explicit to prevent implicit type conversions from error codes and is provided with the specification noexcept [SWS_PER_00355]. This ensures that no further exceptions can occur during the construction of the exception object itself; creation is thus completely exception-safe (exception safe) [SWS_PER_00355].

Regarding concurrency, the creation of ara::per::PerException is specified as thread-safe (thread-safe) [SWS_PER_00355]. After invoking the constructor, the object is thrown along the call stack. Ownership and destruction follow standard C++ rules for exception handling: The object remains in the memory area of the runtime system until the catching catch block has ended, and is subsequently destroyed deterministically.

Usage Path

The typical sequence when using ara::per::PerException is structured into the following steps:

  • Error detection and code creation: The persistence module identifies an invalid state or the failure of a storage operation and maps this into a corresponding ara::core::ErrorCode.
  • Instantiation: Passing this error code, the exception object is explicitly created via PerException(errorCode) [SWS_PER_00355].
  • Throwing the exception: The persistence subsystem throws the exception instance from the affected function interface.
  • Catching and evaluation: The calling application catches the object specifically as ara::per::PerException or polymorphically as ara::core::Exception or std::exception, respectively. Interpretation: The application is then likely to read the encapsulated ara::core::ErrorCode via the access methods inherited from the base class in order to initiate targeted troubleshooting measures. Question Q-6e48fd125d9938d8 (open)

Error Scenarios

Since ara::per::PerException serves to represent errors, error scenarios focus on the robustness of object creation and the integrity of the error information. As an essential precondition, the constructor requires a valid ara::core::ErrorCode as an input parameter [SWS_PER_00355]. Because the constructor is declared as noexcept, secondary exceptions occurring during error reporting are ruled out [SWS_PER_00355]. In addition, the specified thread safety guarantees that even with concurrent errors in multiple execution threads, no data corruption or uncoordinated side effects occur [SWS_PER_00355].

This guide is based exclusively on the specification data of AUTOSAR Adaptive Platform release R25-11.

UML class diagram

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

G nara__per__PerException768 PerException + PerException() nara__core__Exception792 Exception nara__per__PerException768->nara__core__Exception792 nstd__exception10 std::exception nara__core__Exception792->nstd__exception10

Constructors and destructor

PerException function

Construct a new Persistency exception object containing an error code.

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

Method documentation

function PerException [SWS_PER_00355] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00135, RS_AP_00159

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

Construct a new Persistency exception object containing an error code.

Header-Datei#include "ara/per/per_error_domain.h"
Scopeclass ara::per::PerException
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_PER_00355
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00355@rel:R25-11#f5dacf6e
Content hash
f5dacf6e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00355
Status: valid/unmigrated Version: rel:R25-11#de57fc23 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_PER_00355@rel:R25-11#de57fc23
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f5dacf6e2026-09-30
  • R19-11rel:R19-11#606e44052026-10-14
  • R20-11rel:R20-11#bf89ad122026-10-14
  • R21-11rel:R21-11#bf89ad122026-10-14
  • R22-11rel:R22-11#b5d8215d2026-10-14
  • R23-11rel:R23-11#9889dc0a2026-10-14
  • R24-11rel:R24-11#de57fc232026-10-14
  • R25-11rel:R25-11#de57fc232026-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