类 ara::core::FutureErrorDomain
[SWS_CORE_00421] Upstream: RS_AP_00130
class FutureErrorDomain final : public ErrorDomain {...};
用户指南人工智能生成
定义用于对来自 Future 和 Promise 的错误进行转换和异常处理的错误范围。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2878f2cb481b
来源
未决问题(1)
定义用于对来自 Future 和 Promise 的错误进行转换和异常处理的错误范围。
上下文
类 ara::core::FutureErrorDomain 构成了通过 ara::core::Future 和 ara::core::Promise 进行异步通信和同步时产生的所有错误情况的特定错误范围。它最终派生自通用基类 ara::core::ErrorDomain,并封装了特定于域的错误原因的标识以及文本转换。为了进行结构化定义,该类为枚举 FutureErrc 提供了类型别名 Errc [SWS_CORE_00431],并为异常类型 FutureException 提供了别名 Exception [SWS_CORE_00432]。通过这种整合,该域充当了核心异步组件与上层 AUTOSAR 错误处理模型之间的核心纽带。
上下文图:错误域在异步组件、错误代码和异常之间的归类。来源:[SWS_CORE_00431]、[SWS_CORE_00432]、[SWS_CORE_00444]
生命周期
初始化通过默认构造函数进行,该构造函数被声明为 constexpr,并被指定为异常安全且线程安全的 [SWS_CORE_00441]。这允许在编译时或在应用程序的静态初始化阶段进行实例化。由于 AUTOSAR Adaptive 生态系统中的错误域通常作为长生存期的全局或静态单例实例保留,因此该实例不经历任何动态状态转换;规范要求所有查询接口具有完全的线程安全性 [SWS_CORE_00442]、[SWS_CORE_00443]。
使用路径
在常规操作流程中,应用程序很少直接与 FutureErrorDomain 的实例交互。相反,当需要格式化或评估 ara::core::ErrorCode 的实例时,会引用该域。首先,方法 Name() 通过基于字符的名称来标识该域 [SWS_CORE_00442]。对于日志记录或错误分析,Message() 将基本类型为 ErrorDomain::CodeType 的数字错误代码转换为可读字符串 [SWS_CORE_00443]。该接口保证返回的指针绝不为 nullptr [SWS_CORE_00443]。如果应用程序不是通过返回代码处理错误,而是采用异常处理,则方法 ThrowAsException() 会将传入的 ErrorCode 对象直接转换为关联的 FutureException [SWS_CORE_00444]。
时序图:通过错误域解析错误详细信息和有条件触发异常。来源:[SWS_CORE_00443]、[SWS_CORE_00444]
错误场景
此类中的失败仅限于启用异常处理时的显式错误转发。虽然 Name()、Message() 和构造函数被声明为 noexcept 且完全异常安全 [SWS_CORE_00441]、[SWS_CORE_00442]、[SWS_CORE_00443],但 ThrowAsException() 显式带有 noexcept(false) 标记且非异常安全,因为按照设计它会抛出 FutureException [SWS_CORE_00444]。一个重要的前提条件涉及工具链配置:如果在编译器中禁用了 C++ 异常,则按照规定 ThrowAsException() 不得参与重载解析 [SWS_CORE_00444]。对于 Message(),无效或无法识别的错误代码不会导致崩溃或空指针,而是大概率被映射到通用占位符文本,因为规范规定了保证返回不等于 nullptr [SWS_CORE_00443]。 问题 Q-f2e8c9249d4c0e13 (未决)
本指南完全基于AUTOSAR Adaptive R25-11的规范要求。
成员图
类图
Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
详细视图
此版本没有元素数据
构造函数和析构函数
Default constructor
constexpr FutureErrorDomain () noexcept;
方法
Translate an error code value into a text message
const char * Message (ErrorDomain::CodeType errorCode) const noexcept override;Return the name of this error domain
const char * Name () const noexcept override;
Throw the exception type corresponding to the given ErrorCode
void ThrowAsException (const ErrorCode &errorCode) const noexcept(false) override;类型别名
Alias for the error code value enumeration
Alias for the exception base class
方法文档
constexpr FutureErrorDomain () noexcept;
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 31762c8e577b
来源
未决问题(1)
本使用说明自动生成。所有内容完全基于 R25-11 版本的 AUTOSAR 规范。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/core/future_error_domain.h" |
|---|
| Scope | class ara::core::FutureErrorDomain |
|---|
| Exception-Sicherheit | exception safe |
|---|
| Thread-Sicherheit | thread-safe |
|---|
Status: valid/unmigrated
Version: rel:R25-11#82fe0b86
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_00441@rel:R25-11#82fe0b86
Point-in-Time History:
Recorded Revisions (8):
- R25-11
rel:R25-11#636925452026-09-30 - R19-11
rel:R19-11#948f99b92026-10-14 - R20-11
rel:R20-11#4174c21b2026-10-14 - R21-11
rel:R21-11#4174c21b2026-10-14 - R22-11
rel:R22-11#53eccf022026-10-14 - R23-11
rel:R23-11#c36db8d62026-10-14 - R24-11
rel:R24-11#7d90a13c2026-10-14 - R25-11
rel:R25-11#82fe0b862026-10-14 active
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
const char * Message (ErrorDomain::CodeType errorCode) const noexcept override;
Translate an error code value into a text message
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: d455f998b9d1
来源
未决问题(1)
使用
类 ara::core::FutureErrorDomain 的成员函数 Message 用于将数值错误码同步转换为含义明确的文本消息 [SWS_CORE_00443]。该函数通过头文件 #include "ara/core/future_error_domain.h" 提供。它接收 ErrorDomain::CodeType 类型的输入参数 errorCode。返回值是指向包含文本消息的以空字符结尾的字符串(const char *)的指针,根据规范,该指针绝不为 nullptr [SWS_CORE_00443]。
并发性与限制
该函数被限定为 noexcept,并被指定为 thread-safe 和 exception safe [SWS_CORE_00443]。因此,无需外部同步即可从并发线程中安全调用它。根据基类 ara::core::ErrorDomain 的要求,返回的指针永久归相应子类所有,调用者在任何情况下都不得手动释放它 [SWS_CORE_00153]。
错误处理与交互
Message 重写了抽象基类 ara::core::ErrorDomain 的纯虚基方法 Message [SWS_CORE_00153],类似于 ara::core::CoreErrorDomain 等其他错误领域中的实现 [SWS_CORE_05243]。根据基类接口,如果传入的错误码不属于该领域,则构成违规(WrongDomainOfAnErrorCodeViolation)[SWS_CORE_00153]。在典型使用场景中,开发人员应该很少直接在领域上调用此方法,因为错误消息通常是通过对象 ara::core::ErrorCode 的方法 Message 获取的 [SWS_CORE_00518]。 问题 Q-a083e0ab17abf079 (未决)
本使用说明由自动化生成,完全基于 Release R25-11 的规范。
| Header-Datei | #include "ara/core/future_error_domain.h" |
|---|
| Scope | class ara::core::FutureErrorDomain |
|---|
| Exception-Sicherheit | exception safe |
|---|
| Thread-Sicherheit | thread-safe |
|---|
Parameter (in)
| Parameter | Beschreibung |
|---|
| errorCode | the error code value |
Rückgabewert
| Typ | Beschreibung |
|---|
| const char * | the text message, never nullptr |
Status: valid/unmigrated
Version: rel:R25-11#651e7339
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_00443@rel:R25-11#651e7339
Point-in-Time History:
Recorded Revisions (8):
- R25-11
rel:R25-11#a593b4912026-09-30 - R19-11
rel:R19-11#9fe7cf222026-10-14 - R20-11
rel:R20-11#298eaa962026-10-14 - R21-11
rel:R21-11#3927e31c2026-10-14 - R22-11
rel:R22-11#22adfaf12026-10-14 - R23-11
rel:R23-11#689aa7532026-10-14 - R24-11
rel:R24-11#d7d2328b2026-10-14 - R25-11
rel:R25-11#651e73392026-10-14 active
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
const char * Name () const noexcept override;
Return the name of this error domain
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 24dcb3dad6eb
来源
未决问题(1)
本文由人工智能生成。始终以规范为准。
| Header-Datei | #include "ara/core/future_error_domain.h" |
|---|
| Scope | class ara::core::FutureErrorDomain |
|---|
| Exception-Sicherheit | exception safe |
|---|
| Thread-Sicherheit | thread-safe |
|---|
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#42d3b301
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_00442@rel:R25-11#42d3b301
Point-in-Time History:
Recorded Revisions (8):
- R25-11
rel:R25-11#2eefab222026-09-30 - R19-11
rel:R19-11#89679cf92026-10-14 - R20-11
rel:R20-11#371005222026-10-14 - R21-11
rel:R21-11#371005222026-10-14 - R22-11
rel:R22-11#cbe4ee322026-10-14 - R23-11
rel:R23-11#7e58a5d92026-10-14 - R24-11
rel:R24-11#39172fc82026-10-14 - R25-11
rel:R25-11#42d3b3012026-10-14 active
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
void ThrowAsException (const ErrorCode &errorCode) const noexcept(false) override;
Throw the exception type corresponding to the given ErrorCode
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 55a47ef84f08
来源
成员函数 ara::core::FutureErrorDomain::ThrowAsException 将传入的 ErrorCode 实例同步转换为异常,并将其作为 FutureException 抛出 [SWS_CORE_00444]。抛出的异常封装了传入的错误代码 [SWS_CORE_00444]。该类由此实现了基类 ara::core::ErrorDomain 的纯虚接口 ThrowAsException [SWS_CORE_00154]。
关于执行和约束条件,适用以下规范:
在与 Adaptive AUTOSAR 错误系统的交互中,该函数直接对应于 ara::core::ErrorCode::ThrowAsException,其行为被定义为转发到关联的域(this->Domain().ThrowAsException(*this))[SWS_CORE_00519]。因此它与其它域中特定于域的实现相对应,例如 ara::core::CoreErrorDomain::ThrowAsException(其改为引发 CoreException)[SWS_CORE_05244]。
本使用说明由 AI 基于 AUTOSAR Adaptive R25-11 规范生成。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/core/future_error_domain.h" |
|---|
| Scope | class ara::core::FutureErrorDomain |
|---|
| Exception-Sicherheit | not exception safe |
|---|
| Thread-Sicherheit | thread-safe |
|---|
Parameter (in)
| Parameter | Beschreibung |
|---|
| errorCode | the ErrorCode instance |
Rückgabewert
Exceptions
FutureException an exception containing the given ErrorCode
Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.
Status: valid/unmigrated
Version: rel:R25-11#6bbbe4e8
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_00444@rel:R25-11#6bbbe4e8
Point-in-Time History:
Recorded Revisions (8):
- R25-11
rel:R25-11#f1affd2c2026-09-30 - R19-11
rel:R19-11#e7e5de062026-10-14 - R20-11
rel:R20-11#22aa0b0f2026-10-14 - R21-11
rel:R21-11#22aa0b0f2026-10-14 - R22-11
rel:R22-11#4c4dbf162026-10-14 - R23-11
rel:R23-11#6bcf1ade2026-10-14 - R24-11
rel:R24-11#5210aeac2026-10-14 - R25-11
rel:R25-11#6bbbe4e82026-10-14 active
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
类型别名文档
using Errc = FutureErrc;
Alias for the error code value enumeration
Status: valid/unmigrated
Version: rel:R25-11#9b73f991
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_00431@rel:R25-11#9b73f991
Point-in-Time History:
Recorded Revisions (8):
- R25-11
rel:R25-11#e6ae0c662026-09-30 - R19-11
rel:R19-11#8bbfe93e2026-10-14 - R20-11
rel:R20-11#25efde862026-10-14 - R21-11
rel:R21-11#c2d041552026-10-14 - R22-11
rel:R22-11#39c269a02026-10-14 - R23-11
rel:R23-11#a0aec86d2026-10-14 - R24-11
rel:R24-11#f7a2d7ac2026-10-14 - R25-11
rel:R25-11#9b73f9912026-10-14 active
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
using Exception = FutureException;
Alias for the exception base class
Status: valid/unmigrated
Version: rel:R25-11#5bad67e1
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_00432@rel:R25-11#5bad67e1
Point-in-Time History:
Recorded Revisions (8):
- R25-11
rel:R25-11#50792cee2026-09-30 - R19-11
rel:R19-11#eef299f32026-10-14 - R20-11
rel:R20-11#4249c0762026-10-14 - R21-11
rel:R21-11#4249c0762026-10-14 - R22-11
rel:R22-11#46f749662026-10-14 - R23-11
rel:R23-11#71091ef62026-10-14 - R24-11
rel:R24-11#71091ef62026-10-14 - R25-11
rel:R25-11#5bad67e12026-10-14 active
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 德文原文