DEENESPTFRRUARHIKOZHNL

类 ara::core::ErrorDomain

[SWS_CORE_00110] Upstream: RS_AP_00130

class ErrorDomain {...};

Encapsulation of an ErrorDomain. An ErrorDomain is the controlling entity for ErrorCode’s error code values, and defines the mapping of such error code values to textual representations. This type constitutes a base class for ErrorDomain implementations. This class is a literal type, and subclasses are strongly advised to be literal types as well.

Header-Datei#include "ara/core/error_domain.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core

用户指南人工智能生成

用作控制错误码的基类,并将领域特定的错误值映射为文本消息。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: d0712f7c0a23 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用作控制错误码的基类,并将领域特定的错误值映射为文本消息。

类 ara::core::ErrorDomain 用作控制错误值的抽象基类,并将领域特定代码映射到其文本表示 [SWS_CORE_00153]。子类封装了系统范围内唯一的标识号,并定义了向不可变错误文本的转换以及特定于类型的异常处理。为了能够作为字面量类型(Literal Type)在编译期使用,该基类具有一个非虚的受保护析构函数 [SWS_CORE_00136]。复制和移动操作被完全禁止,因此其实例充当不可变的实体。

上下文

类 ara::core::ErrorDomain 构成了 AUTOSAR Adaptive Platform 中结构化错误管理的通用基础。它充当具体错误领域的抽象基类,并承担对封装在 ara::core::ErrorCode 中的错误值的中央控制职责。每个领域建立自己的命名空间,并通过 Message() ([SWS_CORE_00153]) 定义类型为 CodeType ([SWS_CORE_00122]) 的领域特定错误值到具有明确含义的文本表示的映射。此外,该类还提供了用于系统唯一领域标识符的类型别名 IdType ([SWS_CORE_00121]),以及用于制造商特定附加数据的 SupportDataType ([SWS_CORE_00123])。

在整个系统中,ara::core::ErrorDomain 与三个主要伙伴进行交互:

  • 子类:特定错误领域继承自 ara::core::ErrorDomain,并实现用于领域名称、错误消息和异常处理的纯虚成员函数。
  • ara::core::ErrorCode:表示具体的错误值,并将描述文本的获取委托给关联的错误领域。
  • 客户端/应用程序代码:通过错误码或直接在领域上查询状态信息 ([SWS_CORE_00152]),或接收抛出的 C++ 异常 ([SWS_CORE_00154])。
diag_kontext Client Client ErrorCode ErrorCode Client->ErrorCode 求值 ErrorDomain ErrorDomain ErrorCode->ErrorDomain zugeordnet zu ErrorDomain->Client 提供 Name / Message / Exception Subklasse Subklasse Subklasse->ErrorDomain leitet ab von

上下文图:ara::core::ErrorDomain 与子类、错误码及应用程序代码之间的关系与协作。来源:[SWS_CORE_00151]、[SWS_CORE_00152]、[SWS_CORE_00153]、[SWS_CORE_00154]。

生命周期

ara::core::ErrorDomain 的实例化受保护:构造函数具有 protected 可见性,并期望一个类型为 IdType ([SWS_CORE_00135]) 的系统唯一领域标识符。由于构造函数被声明为 constexpr 和 noexcept,基类支持在编译期作为字面量类型(Literal Type)进行创建。明确建议子类同样保证这种作为字面量类型的特性。

完全禁止领域实例的任何复制或传递:

析构函数被声明为 protected 并定义为默认实现 ([SWS_CORE_00136])。它特意保持为平凡且非虚的,以便该类可以保持为字面量类型(Literal Type)。尽管 ara::core::ErrorDomain 提供了纯虚接口,但不需要通过基类指针进行多态析构 ([SWS_CORE_00136])。在实践中,具体的领域实例很可能作为长生命周期或静态对象进行管理(解释)。 问题 Q-a874dd64f6320d21 (未决)

关于所有权关系,所有指向名称 ([SWS_CORE_00152]) 和错误文本 ([SWS_CORE_00153]) 的指针均归领域类所有,客户端不得将其释放。所有读取和比较操作都是线程安全且异常安全的 ([SWS_CORE_00135], [SWS_CORE_00151])。

使用路径

当且仅当通过 Id() ([SWS_CORE_00151]) 获取的领域标识符一致时,ara::core::ErrorDomain 的两个实例比较结果才为相等 ([SWS_CORE_00137], [SWS_CORE_00138])。错误解析和异常处理的典型流程分为以下步骤:

  1. 领域标识:客户端或错误对象通过 Name() ([SWS_CORE_00152]) 获取以空字符结尾的字符串形式的领域名称。
  2. 消息解析:通过 Message(errorCode) 将数值错误值传递给领域 ([SWS_CORE_00153])。该领域返回一个基于指针的、以空字符结尾的错误文本,该文本绝不能为 nullptr。
  3. 异常处理:若要将错误码转换为异常,客户端将调用 ThrowAsException(errorCode) ([SWS_CORE_00154])。该领域随后会抛出封装了所传递错误码的合适 ara::core::Exception 实例。
错误解析与异常抛出ClientErrorCodeErrorDomainFehler abfragenMessage(errorCode)const char* (Fehlertext)Text bereitstellenoptC++ Exceptions aktiviertThrowAsException(errorCode)wirft Exception

时序图:通过 ErrorDomain 进行文本解析和异常抛出的典型序列。来源:[SWS_CORE_00152]、[SWS_CORE_00153]、[SWS_CORE_00154]。

错误场景

在使用 ara::core::ErrorDomain 时,必须考虑以下错误场景和接口要求:

  • 错误的领域归属:如果向方法 Message() 传递了一个并非源自该特定 ErrorDomain 的 errorCode,则构成规定的违例 WrongDomainOfAn-ErrorCodeViolation ([SWS_CORE_00153])。调用者必须确保错误码与领域实例相匹配。
  • 禁用的 C++ 异常:方法 ThrowAsException() 不是异常安全的 (not exception safe) 并且会抛出异常 ([SWS_CORE_00154])。如果在编译器工具链中禁用了 C++ 异常,则该函数不得参与重载决议 ([SWS_CORE_00154])。
  • 排除空指针:Name() 和 Message() 都绝不允许返回 nullptr ([SWS_CORE_00152], [SWS_CORE_00153])。返回 nullptr 的子类实现违反了接口规范。

本指南由 AI 策展助手基于 AUTOSAR 规范 R25-11 生成。

成员图

类图

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

G nara__core__ErrorDomain335 ErrorDomain + ErrorDomain() + operator=() + Id() + Message() + Name() + ThrowAsException() + operator!=() + operator==() + ~ErrorDomain() napext__com__secoc__ComSecOcFvmErrorDomain756 ComSecOcFvmErrorDomain napext__com__secoc__ComSecOcFvmErrorDomain756->nara__core__ErrorDomain335 napext__tsync__TsyncFvmErrorDomain111 TsyncFvmErrorDomain napext__tsync__TsyncFvmErrorDomain111->nara__core__ErrorDomain335 nara__com__ComErrorDomain658 ComErrorDomain nara__com__ComErrorDomain658->nara__core__ErrorDomain335 nara__com__e2e__ComE2EErrorDomain501 ComE2EErrorDomain nara__com__e2e__ComE2EErrorDomain501->nara__core__ErrorDomain335 nara__core__CoreErrorDomain113 CoreErrorDomain nara__core__CoreErrorDomain113->nara__core__ErrorDomain335 nara__core__FutureErrorDomain146 FutureErrorDomain nara__core__FutureErrorDomain146->nara__core__ErrorDomain335 nara__crypto__CryptoErrorDomain690 CryptoErrorDomain nara__crypto__CryptoErrorDomain690->nara__core__ErrorDomain335 nara__diag__DiagErrorDomain167 DiagErrorDomain nara__diag__DiagErrorDomain167->nara__core__ErrorDomain335 nara__diag__DiagOfferErrorDomain584 DiagOfferErrorDomain nara__diag__DiagOfferErrorDomain584->nara__core__ErrorDomain335 nara__diag__DiagReportingErrorDomain575 DiagReportingErrorDomain nara__diag__DiagReportingErrorDomain575->nara__core__ErrorDomain335 nara__diag__DiagSovdErrorDomain991 DiagSovdErrorDomain nara__diag__DiagSovdErrorDomain991->nara__core__ErrorDomain335 nara__diag__DiagUdsNrcErrorDomain838 DiagUdsNrcErrorDomain nara__diag__DiagUdsNrcErrorDomain838->nara__core__ErrorDomain335 nara__exec__ExecErrorDomain631 ExecErrorDomain nara__exec__ExecErrorDomain631->nara__core__ErrorDomain335 nara__per__PerErrorDomain979 PerErrorDomain nara__per__PerErrorDomain979->nara__core__ErrorDomain335 nara__phm__PhmErrorDomain808 PhmErrorDomain nara__phm__PhmErrorDomain808->nara__core__ErrorDomain335 nara__sm__SmErrorDomain386 SmErrorDomain nara__sm__SmErrorDomain386->nara__core__ErrorDomain335 nara__tsync__TsyncErrorDomain367 TsyncErrorDomain nara__tsync__TsyncErrorDomain367->nara__core__ErrorDomain335

详细视图

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

构造函数和析构函数

ErrorDomain 函数 3

Copy construction shall be disabled

重载 ErrorDomain 3
ErrorDomain (const ErrorDomain &)=delete; SWS_CORE_00131
ErrorDomain (ErrorDomain &&)=delete; SWS_CORE_00132
explicit constexpr ErrorDomain (IdType id) noexcept; SWS_CORE_00135

Destructor

~ErrorDomain () noexcept=default;

方法

Id 函数

Return the unique domain identifier

constexpr IdType Id () const noexcept;
Message 函数

Return a textual representation of the given errorCode.

virtual const char * Message (CodeType errorCode) const noexcept=0;
Name 函数

Return the name of this ErrorDomain

virtual const char * Name () const noexcept=0;

Throw the given errorCode as an ara::core::Exception.

virtual void ThrowAsException (const ErrorCode &errorCode) const noexcept(false)=0;

运算符

operator!= 函数

Compare for non-equality with another ara::core::ErrorDomain instance

constexpr bool operator!= (const ErrorDomain &other) const noexcept;
operator= 函数 2

Copy assignment shall be disabled

重载 = 2
ErrorDomain & operator= (const ErrorDomain &)=delete; SWS_CORE_00133
ErrorDomain & operator= (ErrorDomain &&)=delete; SWS_CORE_00134
operator== 函数

Compare for equality with another ara::core::ErrorDomain instance. Two ara::core::ErrorDomain instances compare equal when their identifiers (returned by Id()) are equal

constexpr bool operator== (const ErrorDomain &other) const noexcept;

类型别名

CodeType 类型别名

Alias type for a domain-specific error code value

using CodeType = std::int32_t;
IdType 类型别名

Alias type for a unique ErrorDomain identifier type

using IdType = std::uint64_t;
SupportDataType 类型别名

Alias type for vendor-specific supplementary data

using SupportDataType = {<support-data-type>};

方法文档

函数 ErrorDomain [SWS_CORE_00131] Upstream: RS_AP_00130

ErrorDomain (const ErrorDomain &)=delete;

Copy construction shall be disabled

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain

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

Record
AUTOSAR/AP/record/SWS_CORE_00131
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00131@rel:R25-11#d4c8f135
Content hash
d4c8f135
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00131
Status: valid/unmigrated Version: rel:R25-11#47cc58ff 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_00131@rel:R25-11#47cc58ff
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a53699852026-09-30
  • R19-11rel:R19-11#8a5b83352026-10-14
  • R20-11rel:R20-11#253664202026-10-14
  • R21-11rel:R21-11#253664202026-10-14
  • R22-11rel:R22-11#12c0c3a52026-10-14
  • R23-11rel:R23-11#9f8935932026-10-14
  • R24-11rel:R24-11#d154072d2026-10-14
  • R25-11rel:R25-11#47cc58ff2026-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

函数 ErrorDomain [SWS_CORE_00132] Upstream: RS_AP_00130

ErrorDomain (ErrorDomain &&)=delete;

Move construction shall be disabled

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain

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

Record
AUTOSAR/AP/record/SWS_CORE_00132
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00132@rel:R25-11#69d1a014
Content hash
69d1a014
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00132
Status: valid/unmigrated Version: rel:R25-11#50c27182 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_00132@rel:R25-11#50c27182
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c062c5772026-09-30
  • R19-11rel:R19-11#aaaf0c582026-10-14
  • R20-11rel:R20-11#9db2d92d2026-10-14
  • R21-11rel:R21-11#9db2d92d2026-10-14
  • R22-11rel:R22-11#f11f44702026-10-14
  • R23-11rel:R23-11#a0c0a1ad2026-10-14
  • R24-11rel:R24-11#4d9ecc622026-10-14
  • R25-11rel:R25-11#50c271822026-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

函数 ErrorDomain [SWS_CORE_00135] Upstream: RS_AP_00130

explicit constexpr ErrorDomain (IdType id) noexcept;

Construct a new instance with the given id. Identifiers are expected to be system-wide unique.

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Sichtbarkeitprotected

Parameter (in)

ParameterBeschreibung
idthe unique identifier

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

Record
AUTOSAR/AP/record/SWS_CORE_00135
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00135@rel:R25-11#95c2ebae
Content hash
95c2ebae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00135
Status: valid/unmigrated Version: rel:R25-11#7727fc1e 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_00135@rel:R25-11#7727fc1e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#cd0ce2332026-09-30
  • R19-11rel:R19-11#101178ec2026-10-14
  • R20-11rel:R20-11#af1004ad2026-10-14
  • R21-11rel:R21-11#4d1113e52026-10-14
  • R22-11rel:R22-11#c4c8d9b02026-10-14
  • R23-11rel:R23-11#ada36ef72026-10-14
  • R24-11rel:R24-11#3395c67f2026-10-14
  • R25-11rel:R25-11#7727fc1e2026-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

函数 Id [SWS_CORE_00151] Upstream: RS_AP_00130

constexpr IdType Id () const noexcept;

Return the unique domain identifier

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 59f6b727c495 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

来自头文件 ara/core/error_domain.h 的类 ara::core::ErrorDomain 的成员函数 Id() 同步返回相应错误域的唯一标识符([SWS_CORE_00151])。该调用不需要传入参数,并将域标识符作为类型 IdType 的值返回,从而确保在整个系统中明确区分不同的错误域。

对于错误处理,相关的是该函数被声明为 noexcept 并归类为 exception safe([SWS_CORE_00151])。因此,它绝不会引发异常,也不报告错误代码或特殊情况。通过具备 constexpr 方法的特性,该标识符在需要时可以在编译时进行求值并用于常量表达式中。

在并发性和调用条件方面,Id() 被指定为 thread-safe([SWS_CORE_00151])。该调用是无状态的且无修改性副作用,因此任意数量的线程都可以并发访问同一实例而无需外部锁定机制。

在域架构内的交互中,标识符构成了主要的比较标准:根据规范,两个 ara::core::ErrorDomain 实例当且仅当其通过 Id() 提供的标识符匹配时才被视为相等,这由相等运算符 operator== 直接实现([SWS_CORE_00137])。

本使用说明由 AI 创建,基于 AUTOSAR Adaptive R25-11。

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
IdTypethe identifier

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

Record
AUTOSAR/AP/record/SWS_CORE_00151
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00151@rel:R25-11#56e00bd8
Content hash
56e00bd8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00151
Status: valid/unmigrated Version: rel:R25-11#7915d90d 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_00151@rel:R25-11#7915d90d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a56b1e7b2026-09-30
  • R19-11rel:R19-11#854ced192026-10-14
  • R20-11rel:R20-11#543969362026-10-14
  • R21-11rel:R21-11#278e5e4b2026-10-14
  • R22-11rel:R22-11#18da8afd2026-10-14
  • R23-11rel:R23-11#2ad535bf2026-10-14
  • R24-11rel:R24-11#7a5f2e402026-10-14
  • R25-11rel:R25-11#7915d90d2026-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

函数 Message [SWS_CORE_00153] Upstream: RS_AP_00130

virtual const char * Message (CodeType errorCode) const noexcept=0;

Return a textual representation of the given errorCode.

The returned pointer remains owned by the ara::core::ErrorDomain sub-class and shall not be freed by clients.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 9827a3eb35a8 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

来自头文件 ara/core/error_domain.h 的基类 ara::core::ErrorDomain 的纯虚函数 Message 用于同步检索传入的特定于域的错误码 errorCode 的文本表示 [SWS_CORE_00153]。它返回一个指向以空字符结尾的字符串 (const char *) 的指针,保证绝不为 nullptr。引用的内存保留归 ara::core::ErrorDomain 的相应子类所有,调用客户端绝不得将其释放 [SWS_CORE_00153]。

关于并发性和健壮性,该方法声明为 noexcept,被视为异常安全(exception safe),并被设计为完全线程安全(thread-safe)[SWS_CORE_00153]。关于可能的错误状态,规范规定不属于 ara::core::ErrorDomain 相应实例的 errorCode 会导致类型为 WrongDomainOfAnErrorCodeViolation 的违例 [SWS_CORE_00153]。

在与 AUTOSAR 错误处理模型的交互中,具体的错误域(例如 ara::core::FutureErrorDomain [SWS_CORE_00443] 和 ara::core::CoreErrorDomain [SWS_CORE_05243])覆盖此方法,以将特定于域的错误码转换为具体的提示文本。解释:与返回文本表示为 StringView 的 ara::core::ErrorCode::Message() [SWS_CORE_00518] 之间的交互,推测基于 ErrorCode 将转换转发给关联错误域的方法 Message。 问题 Q-f9007fdf5234b6a4 (未决)

此使用说明是基于规范要求自动生成的。

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)WrongDomainOfAn- If the errorCode did not originate from this ara::core:: ErrorCodeViolation ErrorDomain

Parameter (in)

ParameterBeschreibung
errorCodethe domain-specific error code

Rückgabewert

TypBeschreibung
const char *the text as a null-terminated string, never nullptr

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

Record
AUTOSAR/AP/record/SWS_CORE_00153
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00153@rel:R25-11#4e549a2e
Content hash
4e549a2e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00153
Status: valid/unmigrated Version: rel:R25-11#4d024521 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_00153@rel:R25-11#4d024521
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#317747242026-09-30
  • R19-11rel:R19-11#53fe833d2026-10-14
  • R20-11rel:R20-11#deab0cbe2026-10-14
  • R21-11rel:R21-11#deab0cbe2026-10-14
  • R22-11rel:R22-11#90438fcf2026-10-14
  • R23-11rel:R23-11#724c70902026-10-14
  • R24-11rel:R24-11#af836d942026-10-14
  • R25-11rel:R25-11#4d0245212026-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

函数 Name [SWS_CORE_00152] Upstream: RS_AP_00130

virtual const char * Name () const noexcept=0;

Return the name of this ErrorDomain

The returned pointer remains owned by class ara::core::ErrorDomain and shall not be freed by clients.

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
const char *the name as a null-terminated string, never nullptr

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

Record
AUTOSAR/AP/record/SWS_CORE_00152
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00152@rel:R25-11#0d1f5bd2
Content hash
0d1f5bd2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00152
Status: valid/unmigrated Version: rel:R25-11#fc1560e6 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_00152@rel:R25-11#fc1560e6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#fbeb10062026-09-30
  • R19-11rel:R19-11#1091ac792026-10-14
  • R20-11rel:R20-11#5d2fb6242026-10-14
  • R21-11rel:R21-11#4d515fa72026-10-14
  • R22-11rel:R22-11#0f7fba942026-10-14
  • R23-11rel:R23-11#17438fd22026-10-14
  • R24-11rel:R24-11#089188232026-10-14
  • R25-11rel:R25-11#fc1560e62026-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

函数 ThrowAsException [SWS_CORE_00154] Upstream: RS_AP_00130

virtual void ThrowAsException (const ErrorCode &errorCode) const noexcept(false)=0;

Throw the given errorCode as an ara::core::Exception.

This function will determine the appropriate exception type for the given ErrorCode according to [SWS_CORE_10953] and throw it. The thrown exception will contain the given ErrorCode.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f434ab45abb9 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::core::ErrorDomain 的纯虚方法 ThrowAsException 用于将传入的错误代码同步作为类型为 ara::core::Exception 的异常抛出 [SWS_CORE_00154]。该函数接受一个对 const ErrorCode &errorCode 的引用作为输入参数,并且没有返回值,因为执行通过抛出异常而终止 [SWS_CORE_00154]。

关于错误和异常行为,相应域根据 [SWS_CORE_10953] 确定与传入错误代码匹配的异常类型并抛出该异常 [SWS_CORE_00154]。引发的异常包含传入的 ErrorCode [SWS_CORE_00154]。该函数被归类为非异常安全(not exception safe)[SWS_CORE_00154]。

对于并发性和编译器上下文,适用以下规范:

  • 线程安全性:调用 ThrowAsException 被指定为线程安全(thread-safe)[SWS_CORE_00154]。
  • 禁用 C++ 异常时的限制:如果编译器工具链中禁用了 C++ 异常,则根据 [SWS_CORE_10304] 该函数不得参与重载解析 [SWS_CORE_00154]。

在与其他组件的交互中,该函数构成了通过错误对象引发异常的基础:因此 ara::core::ErrorCode::ThrowAsException 通过 this->Domain().ThrowAsException(*this) 将抛出操作委托给关联的域 [SWS_CORE_00519]。具体实现会重写此接口以抛出特定异常,例如 CoreErrorDomain [SWS_CORE_05244] 中的 CoreException 或 FutureErrorDomain [SWS_CORE_00444] 中的 FutureException。

本段文本由人工智能创建,基于 AUTOSAR Adaptive R25-11 规范。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errorCodethe errorCode

Rückgabewert

TypBeschreibung
None

Exceptions

Any exception of the type as defined in [SWS_CORE_10953] containing the given ErrorCode

Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain. As per [SWS_CORE_10304].

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

Record
AUTOSAR/AP/record/SWS_CORE_00154
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00154@rel:R25-11#911bf118
Content hash
911bf118
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00154
Status: valid/unmigrated Version: rel:R25-11#2ab310df 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_00154@rel:R25-11#2ab310df
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#04a7381e2026-09-30
  • R19-11rel:R19-11#d1678c642026-10-14
  • R20-11rel:R20-11#0a1202b52026-10-14
  • R21-11rel:R21-11#8bd539962026-10-14
  • R22-11rel:R22-11#2da1f5282026-10-14
  • R23-11rel:R23-11#b794869c2026-10-14
  • R24-11rel:R24-11#e8939dbd2026-10-14
  • R25-11rel:R25-11#2ab310df2026-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

函数 operator!= [SWS_CORE_00138] Upstream: RS_AP_00130

constexpr bool operator!= (const ErrorDomain &other) const noexcept;

Compare for non-equality with another ara::core::ErrorDomain instance

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
bool• TRUE: if other is equal to *this • FALSE: if other is NOT equal to *this

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

Record
AUTOSAR/AP/record/SWS_CORE_00138
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00138@rel:R25-11#d9b6c8d4
Content hash
d9b6c8d4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00138
Status: valid/unmigrated Version: rel:R25-11#fc670ab6 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_00138@rel:R25-11#fc670ab6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#52d843402026-09-30
  • R19-11rel:R19-11#cc8291d02026-10-14
  • R20-11rel:R20-11#b8b660df2026-10-14
  • R21-11rel:R21-11#b8b660df2026-10-14
  • R22-11rel:R22-11#ef503a462026-10-14
  • R23-11rel:R23-11#4677b4a92026-10-14
  • R24-11rel:R24-11#4ca5ab382026-10-14
  • R25-11rel:R25-11#fc670ab62026-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

函数 operator= [SWS_CORE_00133] Upstream: RS_AP_00130

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

Copy assignment shall be disabled

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain

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

Record
AUTOSAR/AP/record/SWS_CORE_00133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00133@rel:R25-11#d73f7940
Content hash
d73f7940
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00133
Status: valid/unmigrated Version: rel:R25-11#a72bc075 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_00133@rel:R25-11#a72bc075
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#46ce05062026-09-30
  • R19-11rel:R19-11#ec3086112026-10-14
  • R20-11rel:R20-11#b0dfad952026-10-14
  • R21-11rel:R21-11#b0dfad952026-10-14
  • R22-11rel:R22-11#76aa11e92026-10-14
  • R23-11rel:R23-11#6652aa502026-10-14
  • R24-11rel:R24-11#ce6ab0582026-10-14
  • R25-11rel:R25-11#a72bc0752026-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

函数 operator= [SWS_CORE_00134] Upstream: RS_AP_00130

ErrorDomain & operator= (ErrorDomain &&)=delete;

Move assignment shall be disabled

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain

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

Record
AUTOSAR/AP/record/SWS_CORE_00134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00134@rel:R25-11#fe89f892
Content hash
fe89f892
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00134
Status: valid/unmigrated Version: rel:R25-11#a3446024 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_00134@rel:R25-11#a3446024
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#75490e2b2026-09-30
  • R19-11rel:R19-11#20aea2242026-10-14
  • R20-11rel:R20-11#e387a3ad2026-10-14
  • R21-11rel:R21-11#aa0b0f262026-10-14
  • R22-11rel:R22-11#19c08d112026-10-14
  • R23-11rel:R23-11#fed0e0492026-10-14
  • R24-11rel:R24-11#895991922026-10-14
  • R25-11rel:R25-11#a34460242026-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

函数 operator== [SWS_CORE_00137] Upstream: RS_AP_00130

constexpr bool operator== (const ErrorDomain &other) const noexcept;

Compare for equality with another ara::core::ErrorDomain instance. Two ara::core::ErrorDomain instances compare equal when their identifiers (returned by Id()) are equal

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
bool• TRUE: if other is equal to *this • FALSE: if other is NOT equal to *this

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

Record
AUTOSAR/AP/record/SWS_CORE_00137
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00137@rel:R25-11#17dba42e
Content hash
17dba42e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00137
Status: valid/unmigrated Version: rel:R25-11#f7d37a0f 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_00137@rel:R25-11#f7d37a0f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b759f8cb2026-09-30
  • R19-11rel:R19-11#a0d8e6902026-10-14
  • R20-11rel:R20-11#9376c7972026-10-14
  • R21-11rel:R21-11#9376c7972026-10-14
  • R22-11rel:R22-11#adbada1b2026-10-14
  • R23-11rel:R23-11#e5d7782f2026-10-14
  • R24-11rel:R24-11#a598cb362026-10-14
  • R25-11rel:R25-11#f7d37a0f2026-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

函数 ~ErrorDomain [SWS_CORE_00136] Upstream: RS_AP_00130

~ErrorDomain () noexcept=default;

Destructor

This dtor is non-virtual (and trivial) so that this class can be a literal type. While this class has virtual functions, no polymorphic destruction is needed.

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
Exception-Sicherheitexception safe
Sichtbarkeitprotected

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

Record
AUTOSAR/AP/record/SWS_CORE_00136
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00136@rel:R25-11#7a29a591
Content hash
7a29a591
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00136
Status: valid/unmigrated Version: rel:R25-11#a2600bf2 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_00136@rel:R25-11#a2600bf2
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#078554662026-09-30
  • R19-11rel:R19-11#edbc85bf2026-10-14
  • R20-11rel:R20-11#ff7bed332026-10-14
  • R21-11rel:R21-11#ed0655f92026-10-14
  • R22-11rel:R22-11#488040762026-10-14
  • R23-11rel:R23-11#a1a2e73d2026-10-14
  • R24-11rel:R24-11#c2637b4a2026-10-14
  • R25-11rel:R25-11#a2600bf22026-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

类型别名文档

类型别名 CodeType [SWS_CORE_00122] Upstream: RS_AP_00130

using CodeType = std::int32_t;

Alias type for a domain-specific error code value

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
SymbolCodeType

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

Record
AUTOSAR/AP/record/SWS_CORE_00122
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00122@rel:R25-11#616799ee
Content hash
616799ee
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00122
Status: valid/unmigrated Version: rel:R25-11#2a58f8c2 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_00122@rel:R25-11#2a58f8c2
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#eda170bd2026-09-30
  • R19-11rel:R19-11#d15559ab2026-10-14
  • R20-11rel:R20-11#4b6c97132026-10-14
  • R21-11rel:R21-11#66ae07402026-10-14
  • R22-11rel:R22-11#177f745c2026-10-14
  • R23-11rel:R23-11#19dd7fc72026-10-14
  • R24-11rel:R24-11#512109402026-10-14
  • R25-11rel:R25-11#2a58f8c22026-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

类型别名 IdType [SWS_CORE_00121] Upstream: RS_AP_00130

using IdType = std::uint64_t;

Alias type for a unique ErrorDomain identifier type

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
SymbolIdType

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

Record
AUTOSAR/AP/record/SWS_CORE_00121
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00121@rel:R25-11#c2f7f84d
Content hash
c2f7f84d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00121
Status: valid/unmigrated Version: rel:R25-11#f1add759 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_00121@rel:R25-11#f1add759
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2f10a6eb2026-09-30
  • R19-11rel:R19-11#f406d7c42026-10-14
  • R20-11rel:R20-11#65a8d3162026-10-14
  • R21-11rel:R21-11#65a8d3162026-10-14
  • R22-11rel:R22-11#4bd6f05b2026-10-14
  • R23-11rel:R23-11#b74037a02026-10-14
  • R24-11rel:R24-11#b74037a02026-10-14
  • R25-11rel:R25-11#f1add7592026-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

类型别名 SupportDataType [SWS_CORE_00123] Upstream: RS_AP_00130

using SupportDataType = {<support-data-type>};

Alias type for vendor-specific supplementary data

Header-Datei#include "ara/core/error_domain.h"
Scopeclass ara::core::ErrorDomain
SymbolSupportDataType

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

Record
AUTOSAR/AP/record/SWS_CORE_00123
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00123@rel:R25-11#6f8d25df
Content hash
6f8d25df
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00123
Status: valid/unmigrated Version: rel:R25-11#6210684e 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_00123@rel:R25-11#6210684e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d665f73f2026-09-30
  • R19-11rel:R19-11#5cf4ba862026-10-14
  • R20-11rel:R20-11#d5a9b4eb2026-10-14
  • R21-11rel:R21-11#d5a9b4eb2026-10-14
  • R22-11rel:R22-11#658cc01f2026-10-14
  • R23-11rel:R23-11#7a992b542026-10-14
  • R24-11rel:R24-11#7a992b542026-10-14
  • R25-11rel:R25-11#6210684e2026-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