DEENESPTFRRUARHIKOZHNL

class ara::phm::PhmErrorDomain

[SWS_PHM_01241] Upstream: RS_AP_00119

class PhmErrorDomain final :            public ara::core::ErrorDomain {...};

Defines the error domain for Platform Health Management.

Header-Datei#include "ara/phm/phm_error_domain.h"
Forwarding-Header#include "ara/phm/phm_fwd.h"
Scopenamespace ara::phm
Basisklasse(n)ara::core::ErrorDomain
Unique IDAs per ara::phm::PhmErrorDomain in [SWS_CORE_90023]

User GuideAI-GENERATED

Defines the error domain of Platform Health Management for mapping messages and throwing exceptions.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 61c82c26ab31 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Defines the error domain of Platform Health Management for mapping messages and throwing exceptions.

The class serves as the domain-specific error domain of Platform Health Management and translates numeric error codes into associated text messages [SWS_PHM_01249]. When exception handling is enabled, it allows matching error exceptions to be thrown selectively via ThrowAsException [SWS_PHM_01250]. If C++ exceptions are disabled in the toolchain, this conversion function is not available, and errors must be processed purely value-based [SWS_PHM_01250].

Context

Class ara::phm::PhmErrorDomain represents the specific error domain of Platform Health Management (PHM) within the AUTOSAR Adaptive Platform. It inherits publicly from base infrastructure ara::core::ErrorDomain and is declared as final, which prevents further derivation. Its central task is to encapsulate numeric error codes of the PHM subsystem, embed them in a standardized context, and provide the semantic mapping to error messages as well as error handling types. Via method Name(), the class provides the standardized identifier of the domain [SWS_PHM_01248]. In addition, it defines standardized interface aliases for error handling: Errc serves as a type alias for the underlying enumeration format PhmErrc [SWS_PHM_01245], while Exception references the base type for domain-specific exceptions PhmException [SWS_PHM_01246].

Lifecycle

Instantiation of ara::phm::PhmErrorDomain occurs via the parameterless default constructor PhmErrorDomain() [SWS_PHM_01247]. This constructor is qualified as noexcept and classified according to the specification as exception-safe (exception safe) and thread-safe [SWS_PHM_01247]. In a typical runtime scenario, an instance of the error domain is likely to be available process-wide as a long-lived object (singleton), so that applications and internal PHM components share the same instance. Question Q-6b33f78e8f3b3e08 (open) All stateless query functions of the class—in particular Name() and Message()—are declared as const noexcept and fully thread-safe [SWS_PHM_01248], [SWS_PHM_01249]. As a result, error descriptions can be queried from multiple parallel control flows without external synchronization.

Usage Path

If an error occurs during monitoring or management of the system health state, the PHM subsystem generates a corresponding error code, which is typically passed to callers encapsulated as ara::core::ErrorCode referencing PhmErrorDomain. Based on the domain, the receiving application software can verify whether the occurred error originates from health management. For diagnosis and logging, it calls method Message(errorCode), which returns the associated text message for the passed code as const char* [SWS_PHM_01249]. If the application handles failed operations via exception handling, it passes the ara::core::ErrorCode to ThrowAsException(errorCode) in order to throw the associated exception [SWS_PHM_01250].

Sequence of error resolution via PhmErrorDomainApplicationPHM-DienstPhmErrorDomainCall monitoring function()Erzeugt ara::core::ErrorCode (Errc)Return ErrorCodeUse Case: Fehlertext ermittelnMessage(errorCode)Fehlermeldung (const char*)optExceptions aktiviertThrowAsException(errorCode)throw PhmException

Sequence diagram: Typical flow of error checking and exception throwing via PhmErrorDomain. Sources: [SWS_PHM_01245], [SWS_PHM_01246], [SWS_PHM_01249], [SWS_PHM_01250]

Error Scenarios

The explicit conversion of an error code into a C++ exception is implemented via the method ThrowAsException(errorCode) [SWS_PHM_01250]. The thrown exception corresponds to type Exception, which maps to PhmException [SWS_PHM_01246]. Because this function throws an exception by design, it is identified in the specification as not exception-safe (not exception safe), but remains thread-safe with respect to invocation [SWS_PHM_01250]. For environments without exception handling, an essential constraint exists: If C++ exceptions are disabled in the compiler, ThrowAsException does not participate in overload resolution [SWS_PHM_01250]. In this mode, callers must handle errors purely value-based via the methods Message() and the return value of the error code [SWS_PHM_01249].

This guide is based on the AUTOSAR specifications of the Adaptive Platform for release R25-11.

Member map

Constructors and destructor

1

Type aliases

2

Class diagram

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

G nara__phm__PhmErrorDomain808 PhmErrorDomain + PhmErrorDomain() + Message() + Name() + ThrowAsException() nara__core__ErrorDomain335 ErrorDomain nara__phm__PhmErrorDomain808->nara__core__ErrorDomain335

Detail view

Select an entry in the outline.

Constructors and destructor

Creates a PhmErrorDomain instance.

PhmErrorDomain () noexcept;

Methods

Message function

Returns the message associated with the error code.

const char * Message (CodeType errorCode) const noexcept override;
Name function

Returns the name of the error domain.

const char * Name () const noexcept override;

Throws the exception associated with the error code. As per [SWS_CORE_10304], this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.

void ThrowAsException (const ara::core::ErrorCode &errorCode) const override;

Type aliases

Errc type alias

Alias for the error code value enumeration.

using Errc = PhmErrc;
Exception type alias

Alias for the exception base class.

Method documentation

function Message [SWS_PHM_01249] Upstream: RS_AP_00119, RS_AP_00159

const char * Message (CodeType errorCode) const noexcept override;

Returns the message associated with the error code.

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

The member function Message of class ara::phm::PhmErrorDomain returns, for a passed error number errorCode of type CodeType, a textual description of the associated error message as const char * [SWS_PHM_01249]. The function is provided via the header file ara/phm/phm_error_domain.h and, as a virtual method (override), overrides the standard interface behavior for error resolution [SWS_PHM_01249].

The following specifications apply to the call context and execution semantics:

  • Synchronous Execution and Exception Handling: The call is synchronous and is declared as noexcept; in addition, the method is specified as exception safe, so that no exceptions are thrown during execution [SWS_PHM_01249].
  • Concurrency: The function is explicitly declared as thread-safe and can be called safely from concurrent threads without additional external synchronization [SWS_PHM_01249].
  • Memory Management: Interpretation: The returned character pointer likely points to a static character literal, so that no memory deallocation needs to be performed by the caller. Question Q-dcdc593e3f9ded45 (open)

In Platform Health Management (PHM), the method is used to translate numerical error codes of PhmErrorDomain into human-readable strings for logging or diagnostic purposes [SWS_PHM_01249].

This text was generated by an AI and serves as guidance. Only the official AUTOSAR specifications are binding.

Header-Datei#include "ara/phm/phm_error_domain.h"
Scopeclass ara::phm::PhmErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errorCodeThe error code number.

Rückgabewert

TypBeschreibung
const char *The message associated with the error code.

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

Record
AUTOSAR/AP/record/SWS_PHM_01249
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PHM_01249@rel:R25-11#29a23c2e
Content hash
29a23c2e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_PlatformHealthManagement.pdf#nameddest=SWS_PHM_01249
Status: valid/unmigrated Version: rel:R25-11#87e7affe 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_PHM_01249@rel:R25-11#87e7affe
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#29a23c2e2026-09-30
  • R22-11rel:R22-11#d28a09b52026-10-14
  • R23-11rel:R23-11#fb2533e82026-10-14
  • R24-11rel:R24-11#87e7affe2026-10-14
  • R25-11rel:R25-11#87e7affe2026-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 Name [SWS_PHM_01248] Upstream: RS_AP_00119, RS_AP_00159

const char * Name () const noexcept override;

Returns the name of the error domain.

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

The member function Name of class ara::phm::PhmErrorDomain returns the name of the error domain as a string ([SWS_PHM_01248]). The declaration is included in module phm via header file #include "ara/phm/phm_error_domain.h" ([SWS_PHM_01248]).

The following requirements apply to practical usage and runtime behavior:

  • Usage and Signature: The method has the signature const char * Name () const noexcept override; ([SWS_PHM_01248]). It is executed synchronously and expects no arguments. The returned pointer of type const char * complies with the requirements for ara::phm::PhmErrorDomain from [SWS_CORE_90023].
  • Error Handling: The function is declared as noexcept and has the exception safety level exception safe ([SWS_PHM_01248]). It throws no exceptions at runtime and generates no error messages.
  • Concurrency: The method is specified as thread-safe (thread-safe) ([SWS_PHM_01248]). Parallel calls across the same or different instances can be performed without additional synchronization mechanisms.

In the architectural interaction, the operation overrides the virtual name query of the superordinate error domain interface and provides the specific name for ara::phm::PhmErrorDomain according to [SWS_CORE_90023] ([SWS_PHM_01248]).

This usage note was generated automatically based on the AUTOSAR specification R25-11.

Header-Datei#include "ara/phm/phm_error_domain.h"
Scopeclass ara::phm::PhmErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
const char *As per ara::phm::PhmErrorDomain in [SWS_CORE_90023]

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

Record
AUTOSAR/AP/record/SWS_PHM_01248
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PHM_01248@rel:R25-11#08e28bf8
Content hash
08e28bf8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_PlatformHealthManagement.pdf#nameddest=SWS_PHM_01248
Status: valid/unmigrated Version: rel:R25-11#87eea56a 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_PHM_01248@rel:R25-11#87eea56a
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#08e28bf82026-09-30
  • R22-11rel:R22-11#3d1a89cc2026-10-14
  • R23-11rel:R23-11#13db17322026-10-14
  • R24-11rel:R24-11#0999648f2026-10-14
  • R25-11rel:R25-11#87eea56a2026-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 PhmErrorDomain [SWS_PHM_01247] Upstream: RS_AP_00119, RS_AP_00159

PhmErrorDomain () noexcept;

Creates a PhmErrorDomain instance.

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

The default constructor PhmErrorDomain() is used to create an instance of the error domain ara::phm::PhmErrorDomain [SWS_PHM_01247]. The call is synchronous and without arguments via header ara/phm/phm_error_domain.h [SWS_PHM_01247].

Regarding execution safety, construction is specified as exception safe and declared with noexcept so that no exceptions are thrown [SWS_PHM_01247]. In addition, instantiation is thread-safe [SWS_PHM_01247].

The created domain forms the context for PHM errors, provides member functions such as Name() [SWS_PHM_01248], Message() [SWS_PHM_01249], and ThrowAsException() [SWS_PHM_01250], and maintains the type aliases Errc [SWS_PHM_01245] and Exception [SWS_PHM_01246]. For regular access to the error domain, the free function GetPhmDomain() is available, which returns a reference to the global object [SWS_PHM_01251]. A separate manual instantiation via the constructor is therefore typically not required in application code. Question Q-63be3bb534ef1fa9 (open)

This usage note was generated automatically based on specification data from AUTOSAR Adaptive R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/phm/phm_error_domain.h"
Scopeclass ara::phm::PhmErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

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

Record
AUTOSAR/AP/record/SWS_PHM_01247
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PHM_01247@rel:R25-11#c1605434
Content hash
c1605434
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_PlatformHealthManagement.pdf#nameddest=SWS_PHM_01247
Status: valid/unmigrated Version: rel:R25-11#e616a447 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_PHM_01247@rel:R25-11#e616a447
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#c16054342026-09-30
  • R22-11rel:R22-11#1e02ca242026-10-14
  • R23-11rel:R23-11#6c11e67c2026-10-14
  • R24-11rel:R24-11#e616a4472026-10-14
  • R25-11rel:R25-11#e616a4472026-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 ThrowAsException [SWS_PHM_01250] Upstream: RS_AP_00119

void ThrowAsException (const ara::core::ErrorCode &errorCode) const override;

Throws the exception associated with the error code. As per [SWS_CORE_10304], this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.

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

use

The member function ThrowAsException is a method of the error domain class ara::phm::PhmErrorDomain and is provided via the header file ara/phm/phm_error_domain.h ([SWS_PHM_01250]). Its purpose is to synchronously throw the C++ exception associated with the passed error code ([SWS_PHM_01250]). For this purpose, the function takes a reference to the error object errorCode of type const ara::core::ErrorCode & as an input parameter ([SWS_PHM_01250]). Because control flow is continued via the exception in case of faulty execution, the method has no return value (void) ([SWS_PHM_01250]).

Concurrency and Execution Safety

With regard to behavior during parallel calls, ThrowAsException is declared as thread-safe ([SWS_PHM_01250]). It can thus be safely and concurrently called from multiple threads. Regarding exception safety, however, the interface is explicitly classified as "not exception safe" in the specification ([SWS_PHM_01250]).

Compiler Restrictions and Overload Resolution

An essential boundary condition for use is defined by [SWS_CORE_10304]: If C++ exceptions are disabled in the used compiler toolchain, ThrowAsException does not participate in overload resolution ([SWS_PHM_01250]). For software builds for platforms or configurations without exception support, the function is thus not available to the compiler for overload resolution ([SWS_PHM_01250]).

This usage note was created automatically and is based on the specification AUTOSAR Adaptive R25-11.

Header-Datei#include "ara/phm/phm_error_domain.h"
Scopeclass ara::phm::PhmErrorDomain
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errorCodeThe error to throw.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_PHM_01250
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PHM_01250@rel:R25-11#98735c90
Content hash
98735c90
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_PlatformHealthManagement.pdf#nameddest=SWS_PHM_01250
Status: valid/unmigrated Version: rel:R25-11#7f33d0e7 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_PHM_01250@rel:R25-11#7f33d0e7
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#98735c902026-09-30
  • R22-11rel:R22-11#ca4e4bdf2026-10-14
  • R23-11rel:R23-11#1075311f2026-10-14
  • R24-11rel:R24-11#7f33d0e72026-10-14
  • R25-11rel:R25-11#7f33d0e72026-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

Type alias documentation

type alias Errc [SWS_PHM_01245] Upstream: RS_AP_00119, RS_AP_00127

using Errc = PhmErrc;

Alias for the error code value enumeration.

Header-Datei#include "ara/phm/phm_error_domain.h"
Scopeclass ara::phm::PhmErrorDomain
SymbolErrc

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

Record
AUTOSAR/AP/record/SWS_PHM_01245
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PHM_01245@rel:R25-11#82e44aca
Content hash
82e44aca
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_PlatformHealthManagement.pdf#nameddest=SWS_PHM_01245
Status: valid/unmigrated Version: rel:R25-11#69dedf2e 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_PHM_01245@rel:R25-11#69dedf2e
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#82e44aca2026-09-30
  • R22-11rel:R22-11#86c185582026-10-14
  • R23-11rel:R23-11#69dedf2e2026-10-14
  • R24-11rel:R24-11#69dedf2e2026-10-14
  • R25-11rel:R25-11#69dedf2e2026-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

type alias Exception [SWS_PHM_01246] Upstream: RS_AP_00119, RS_AP_00127

using Exception = PhmException;

Alias for the exception base class.

Header-Datei#include "ara/phm/phm_error_domain.h"
Scopeclass ara::phm::PhmErrorDomain
SymbolException

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

Record
AUTOSAR/AP/record/SWS_PHM_01246
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PHM_01246@rel:R25-11#e2b0390c
Content hash
e2b0390c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_PlatformHealthManagement.pdf#nameddest=SWS_PHM_01246
Status: valid/unmigrated Version: rel:R25-11#3b0710ff 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_PHM_01246@rel:R25-11#3b0710ff
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#e2b0390c2026-09-30
  • R22-11rel:R22-11#c46a9c8a2026-10-14
  • R23-11rel:R23-11#3b0710ff2026-10-14
  • R24-11rel:R24-11#3b0710ff2026-10-14
  • R25-11rel:R25-11#3b0710ff2026-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