DEENESPTFRRUARHIKOZHNL

类 ara::shwa::ShwaErrorDomain

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_01304] 原文尚未导入 Upstream: RS_AP_00122, RS_AP_00127, RS_AP_00140, RS_SHWA_00007

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

Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.

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

用户指南人工智能生成

定义 shwa 模块的错误域,用于查询错误消息并抛出匹配的异常。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 170823c86562 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

定义 shwa 模块的错误域,用于查询错误消息并抛出匹配的异常。

类 ara::shwa::ShwaErrorDomain 为模块 shwa 提供特定于模块的错误域,并将错误代码与描述及关联的异常类型相关联 [AP_SWS_SHWA_01305]。除了以文本形式查询域名和错误消息之外,它还提供了通过 ThrowAsException() 定向将错误作为异常抛出的可能性 [AP_SWS_SHWA_01310]。检查方法被声明为线程安全和异常安全。

上下文

类 ara::shwa::ShwaErrorDomain 代表 Adaptive Platform 上模块 shwa 的专用错误域,并派生自基类 ara::core::ErrorDomain。它充当明确标识、命名和文本描述模块特定错误原因的核心纽带。通常,错误域与 ara::core::ErrorCode 实例以及通过 ShwaException 进行的相关异常处理紧密交互。通过类型别名,该类提供与模块特定错误类型的直接映射:Errc 引用 ShwaErrorCode [AP_SWS_SHWA_01305],而 Exception 引用 ShwaException [AP_SWS_SHWA_01306]。

ShwaErrorDomainContext ShwaErrorDomain ShwaErrorDomain ErrorDomain ErrorDomain ShwaErrorDomain->ErrorDomain erbt von ShwaErrorCode ShwaErrorCode ShwaErrorDomain->ShwaErrorCode Errc ShwaException ShwaException ShwaErrorDomain->ShwaException Exception Anwendung Anwendung Anwendung->ShwaErrorDomain 使用 ErrorCode ErrorCode Anwendung->ErrorCode haelt ErrorCode->ShwaErrorDomain referenziert

上下文图:ShwaErrorDomain 在与错误代码、异常和应用逻辑相互作用中的嵌入。来源:[AP_SWS_SHWA_01305]、[AP_SWS_SHWA_01306]、[AP_SWS_SHWA_01310]

生命周期

ShwaErrorDomain 的实例化通过默认构造函数 ShwaErrorDomain() 进行,该构造函数声明为 noexcept 并同时确保线程安全性与异常安全性 [AP_SWS_SHWA_01307]。作为 AUTOSAR Adaptive 错误处理模型中错误域的代表,此类实例通常长期保留(解释:推测作为静态或全局单例对象),以便反复比对错误上下文。 问题 Q-82cb2e14793eeaef (未决)除异常抛出外,该实例的所有读取方法均是线程安全的并且不抛出异常。

使用路径

在常规处理流程中,当发生模块专用错误时,组件会在引用错误域的情况下生成一个 ara::core::ErrorCode。为了进行文本输出或记录,使用者调用方法 Name() 以确定错误域的标识符 [AP_SWS_SHWA_01308],或者通过 Message(errorCode) 获取与数值代码关联的错误描述 [AP_SWS_SHWA_01309]。如果需要将错误代码转移到 C++ 异常路径中,调用逻辑将触发 ThrowAsException() [AP_SWS_SHWA_01310]。

Nutzung von ShwaErrorDomain应用ErrorCodeShwaErrorDomainDomain()对 ShwaErrorDomain 的引用Name()const char* 域名Message(CodeType)const char* FehlerbeschreibungoptAusnahmebehandlung erforderlichThrowAsException(errorCode)wirft ShwaException

时序图:错误查询和转换为异常时的典型流程。来源:[AP_SWS_SHWA_01308]、[AP_SWS_SHWA_01309]、[AP_SWS_SHWA_01310]

错误场景

错误域本身用于对错误进行分类,并且在其检查功能中设计为在很大程度上具有容错性。Name() [AP_SWS_SHWA_01308] 和 Message() [AP_SWS_SHWA_01309] 均被指定为 noexcept 且异常安全,因此即使对于未知的错误代码,也会提供指向字符串的已定义指针(解释:推测为静态提示或占位符文本)。 问题 Q-03a63539b08ddb73 (未决)唯一显式抛出的错误场景由方法 ThrowAsException(errorCode) 构成 [AP_SWS_SHWA_01310]:它被带有 noexcept(false) 声明为“not exception safe”,因为其主要目的在于定向抛出 Exception(ShwaException)[AP_SWS_SHWA_01306] 类型的异常。

本指南完全基于 Adaptive Platform R25-11 的规范数据。

成员图

构造函数和析构函数

1

类型别名

2

详细视图

请在大纲中选择一个条目。

构造函数和析构函数

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

ShwaErrorDomain () noexcept;

方法

Message 函数

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

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

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

const char * Name () const noexcept override;

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

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

类型别名

Errc 类型别名

Der Typ-Alias ordnet den in der Signatur angegebenen Namen dem dargestellten Typ zu.

using Errc = ShwaErrorCode;
Exception 类型别名

Der Typ-Alias ordnet den in der Signatur angegebenen Namen dem dargestellten Typ zu.

using Exception = ShwaException;

详细信息

类型别名 Errc [AP_SWS_SHWA_01305] Upstream: RS_AP_00122

using Errc = ShwaErrorCode;

Der Typ-Alias ordnet den in der Signatur angegebenen Namen dem dargestellten Typ zu.

Scopeclass ara::shwa::ShwaErrorDomain

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01305
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01305@rel:R25-11#bb86cd39
Content hash
bb86cd39
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01305
Status: valid/unmigrated Version: rel:R25-11#d2981606 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_01305@rel:R25-11#d2981606
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

类型别名 Exception [AP_SWS_SHWA_01306] Upstream: RS_AP_00122

using Exception = ShwaException;

Der Typ-Alias ordnet den in der Signatur angegebenen Namen dem dargestellten Typ zu.

Scopeclass ara::shwa::ShwaErrorDomain

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01306
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01306@rel:R25-11#2ed6afb9
Content hash
2ed6afb9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01306
Status: valid/unmigrated Version: rel:R25-11#c6c40f28 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_01306@rel:R25-11#c6c40f28
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

函数 ShwaErrorDomain [AP_SWS_SHWA_01307] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00159

ShwaErrorDomain () noexcept;

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

Scopeclass ara::shwa::ShwaErrorDomain
Thread Safetythread-safe
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01307
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01307@rel:R25-11#b5acfd65
Content hash
b5acfd65
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01307
Status: valid/unmigrated Version: rel:R25-11#357e78fe 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_01307@rel:R25-11#357e78fe
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

函数 Message [AP_SWS_SHWA_01309] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00159

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

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

Scopeclass ara::shwa::ShwaErrorDomain
Thread Safetythread-safe
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01309
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01309@rel:R25-11#6e52c5cc
Content hash
6e52c5cc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01309
Status: valid/unmigrated Version: rel:R25-11#6c181364 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_01309@rel:R25-11#6c181364
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

函数 Name [AP_SWS_SHWA_01308] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00159

const char * Name () const noexcept override;

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

Scopeclass ara::shwa::ShwaErrorDomain
Thread Safetythread-safe
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01308
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01308@rel:R25-11#bc0fe0c6
Content hash
bc0fe0c6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01308
Status: valid/unmigrated Version: rel:R25-11#3907a87c 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_01308@rel:R25-11#3907a87c
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

函数 ThrowAsException [AP_SWS_SHWA_01310] Upstream: RS_AP_00120, RS_AP_00121

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

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

Scopeclass ara::shwa::ShwaErrorDomain
Thread Safetythread-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_01310
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01310@rel:R25-11#cfb075c4
Content hash
cfb075c4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01310
Status: valid/unmigrated Version: rel:R25-11#865a3931 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_01310@rel:R25-11#865a3931
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