DEENESPTFRRUARHIKOZHNL

类 ara::exec::ExecErrorDomain

[SWS_EM_02284] Upstream: RS_AP_00130, RS_AP_00122, RS_AP_00127, RS_AP_00154, RS_AP_00150

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

Defines a class representing the Execution Management error domain.

Header-Datei#include "ara/exec/exec_error_domain.h"
Forwarding-Header#include "ara/exec/exec_fwd.h"
Scopenamespace ara::exec
Basisklasse(n)ara::core::ErrorDomain
Unique IDAs per ara::exec::ExecErrorDomain in [SWS_CORE_90023]

用户指南人工智能生成

用于识别 Execution Management 错误并将其映射到消息文本和异常对象。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ef35ce1740d7 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用于识别 Execution Management 错误并将其映射到消息文本和异常对象。

类 ara::exec::ExecErrorDomain 为 Execution Management 定义错误域,并将数值错误码映射到描述性消息([SWS_EM_02288])。它支持默认构造([SWS_EM_02286]),并允许引发类型安全的 ExecException 异常([SWS_EM_02289])。当禁用 C++ 异常时,函数 ThrowAsException() 根据 [SWS_CORE_10304] 在编译期被禁用([SWS_EM_02289])。

上下文

类 ara::exec::ExecErrorDomain 为 AUTOSAR Adaptive Platform 内的功能群集 Execution Management 定义了专用错误域。作为基类 ara::core::ErrorDomain 的 final 特化,它封装了域特定错误原因的分配,并在数值错误码与语义错误描述之间架起桥梁。除基类型 ara::core::ErrorDomain 外,该类还与 ara::core::ErrorCode 紧密交互,并在出错时实例化 ExecException 类型的专用异常对象([SWS_EM_02289])。通过方法 Name(),该类提供符合 [SWS_CORE_90023] 中规范 ara::exec::ExecErrorDomain 的域文本标识符([SWS_EM_02287])。

ExecErrorDomainContext ara::core::ErrorDomain ara::core::ErrorDomain ara::exec::ExecErrorDomain ara::exec::ExecErrorDomain ara::core::ErrorDomain->ara::exec::ExecErrorDomain vererbt an ExecException ExecException ara::exec::ExecErrorDomain->ExecException erzeugt ara::core::ErrorCode ara::core::ErrorCode ara::core::ErrorCode->ara::exec::ExecErrorDomain referenziert

上下文图:ExecErrorDomain 及其在错误系统中的交互对象归类。来源:[SWS_EM_02287]、[SWS_EM_02289]、[SWS_CORE_90023]

生命周期

ara::exec::ExecErrorDomain 的对象通过默认构造函数创建([SWS_EM_02286])。该构造声明为 noexcept,并保证完全的异常安全性和线程安全性([SWS_EM_02286])。由于该类不公开可变状态并声明为 final,因此所有读取操作均无副作用。在实际应用中,推测通常会使用错误域的全局或静态实例(解读:对应 Adaptive AUTOSAR 的通用错误模型),尽管随时可以通过构造函数直接进行实例化。 问题 Q-b70cae50db2eec09 (未决)

在并发性方面,所有成员函数——具体而言是通过 Name() 查询名称([SWS_EM_02287])、通过 Message() 解析错误消息([SWS_EM_02288])以及使用 ThrowAsException() 抛出异常([SWS_EM_02289])——均被显式指定为线程安全。因此,多个执行线程可以并发查询同一实例,而无需外部同步。

使用路径

在常规执行路径中,该域用于将错误编号转换为易于理解的诊断消息,并将错误码转换为异常对象。如果 Execution Management 的操作内部发生错误,通常表示为 ara::core::ErrorCode,其在内部引用 ara::exec::ExecErrorDomain 的实例。为了输出文本,调用方将数值错误标识符传递给 Message()([SWS_EM_02288]),并获得指向描述原因的不可变字符串(const char*)的指针。

如果调用方组件决定采用基于异常的错误处理,则使用方法 ThrowAsException()([SWS_EM_02289])。该函数接收对 ara::core::ErrorCode 的引用,由此创建 ExecException 的新实例,并将其作为 C++ 异常直接抛出到调用上下文中([SWS_EM_02289])。

通过 ExecErrorDomain 进行异常处理应用ExecErrorDomainExecExceptionThrowAsException(errorCode)评估 errorCode使用 errorCode 创建实例wirft ExecException

时序图:通过 ThrowAsException 引发 C++ 异常的流程。来源:[SWS_EM_02289]、[SWS_CORE_10304]

错误场景

用于信息查询的方法具有严格的保证:无论是构造([SWS_EM_02286])、通过 Name() 进行的名称检索([SWS_EM_02287]),还是通过 Message() 进行的消息查询([SWS_EM_02288]),都不会引发异常(noexcept),并且三者都被归类为异常安全(“exception safe”)。对于未知错误码,Message() 推测可能会返回通用占位符文本或空字符串(解读:有效负载未针对无效的 CodeType 值定义单独的错误行为)。 问题 Q-00938e624e81e82a (未决)

ThrowAsException() 具有特殊行为:该函数被指定为 noexcept(false),并显式指定为非异常安全(“not exception safe”),因为其本身的目的就在于抛出 ExecException([SWS_EM_02289])。此外,工具链的一项基本条件生效:根据 [SWS_CORE_10304],如果编译器中禁用了 C++ 异常,则 ThrowAsException() 不参与重载解析([SWS_EM_02289])。因此,在没有异常支持的系统环境中,该路径在编译期不可用,从而强制必须通过返回值来评估错误。

本文档由人工智能基于 AUTOSAR 规范 R25-11 生成。

成员图

构造函数和析构函数

1

类图

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

G nara__exec__ExecErrorDomain631 ExecErrorDomain + ExecErrorDomain() + Message() + Name() + ThrowAsException() nara__core__ErrorDomain335 ErrorDomain nara__exec__ExecErrorDomain631->nara__core__ErrorDomain335

详细视图

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

构造函数和析构函数

Constructs a new ExecErrorDomain object.

ExecErrorDomain () noexcept;

方法

Message 函数

Returns the message associated with errorCode.

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

Returns a string constant associated with ExecErrorDomain.

const char * Name () const noexcept override;

Creates a new instance of ExecException from errorCode and throws it as a C++ exception. 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 noexcept(false) override;

方法文档

函数 ExecErrorDomain [SWS_EM_02286] Upstream: RS_AP_00120, RS_AP_00130, RS_AP_00159

ExecErrorDomain () noexcept;

Constructs a new ExecErrorDomain object.

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

默认构造函数 ExecErrorDomain() 根据 [SWS_EM_02286] 初始化错误域 ara::exec::ExecErrorDomain 的新实例。该调用同步进行,不接收任何参数,且没有返回值。其声明通过头文件 ara/exec/exec_error_domain.h 包含。

在健壮性和并发性方面,该构造函数声明为 noexcept,被视为异常安全(exception safe),并被指定为完全线程安全(thread-safe)[SWS_EM_02286]。对象创建时无需进行错误处理,因为该操作无错误执行,不引发任何错误码或异常。

在整个系统中,创建的对象用于表示和描述 Execution Management 的模块特定错误。通过该实例可以查询域名 [SWS_EM_02287]、获取错误码的文本消息 [SWS_EM_02288],或者将错误作为 C++ 异常抛出 [SWS_EM_02289]。在应用程序模块中很少需要通过该构造函数进行显式实例化,因为通过非成员函数 GetExecErrorDomain() 已经提供了对该实例的全局引用 [SWS_EM_02290]。 问题 Q-df8efc87e6547216 (未决)

本文字由人工智能创建,基于 AUTOSAR R25-11。

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

Header-Datei#include "ara/exec/exec_error_domain.h"
Scopeclass ara::exec::ExecErrorDomain
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_EM_02286
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02286@rel:R25-11#6a172ca5
Content hash
6a172ca5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02286
Status: valid/unmigrated Version: rel:R25-11#a6321b98 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_EM_02286@rel:R25-11#a6321b98
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#06e26ef92026-09-30
  • R19-11rel:R19-11#c9fefe412026-10-14
  • R20-11rel:R20-11#5b98d2302026-10-14
  • R21-11rel:R21-11#751166162026-10-14
  • R22-11rel:R22-11#5827680d2026-10-14
  • R23-11rel:R23-11#8bbc01962026-10-14
  • R24-11rel:R24-11#934e78e52026-10-14
  • R25-11rel:R25-11#a6321b982026-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_EM_02288] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130, RS_AP_00159

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

Returns the message associated with errorCode.

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

方法 Message 是功能集群 Execution Management 内部类 ara::exec::ExecErrorDomain 的虚成员函数 [SWS_EM_02288]。它通过头文件 ara/exec/exec_error_domain.h 引入,并重写了用于确定文本错误消息的相应接口 [SWS_EM_02288]。

用法如下:

  • 调用和语义:调用同步进行,并设计为读取操作(const)[SWS_EM_02288]。
  • 参数:类型为 CodeType 的 errorCode 作为输入参数传递,表示错误的数字标识符 [SWS_EM_02288]。
  • 返回值:该函数返回一个类型为 const char * 的指针,指向与错误码关联的错误消息 [SWS_EM_02288]。解释:可以假定该指针指向一个静态字符串,因此调用方无需释放内存。 问题 Q-3e254e008a07294e (未决)

关于错误处理,该函数被声明为 noexcept 并被指定为 exception safe [SWS_EM_02288]。该函数本身不触发 C++ 异常。规范中未为错误调用规定专用的错误码或反馈通道 [SWS_EM_02288]。

关于并发性,该方法被分类为 thread-safe [SWS_EM_02288]。由于它不更改错误域的状态,因此多个线程可以安全地并行调用它,而无需外部同步机制 [SWS_EM_02288]。

本使用说明基于 AUTOSAR Adaptive R25-11 规范自动创建。

Header-Datei#include "ara/exec/exec_error_domain.h"
Scopeclass ara::exec::ExecErrorDomain
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_EM_02288
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02288@rel:R25-11#85b8c45a
Content hash
85b8c45a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02288
Status: valid/unmigrated Version: rel:R25-11#b9df5281 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_EM_02288@rel:R25-11#b9df5281
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#5def3e1a2026-09-30
  • R19-11rel:R19-11#d31cbdd02026-10-14
  • R20-11rel:R20-11#679ee02b2026-10-14
  • R21-11rel:R21-11#679ee02b2026-10-14
  • R22-11rel:R22-11#e4baf8fd2026-10-14
  • R23-11rel:R23-11#7ed2ece62026-10-14
  • R24-11rel:R24-11#03e1c5982026-10-14
  • R25-11rel:R25-11#b9df52812026-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_EM_02287] Upstream: RS_AP_00120, RS_AP_00130, RS_AP_00159

const char * Name () const noexcept override;

Returns a string constant associated with ExecErrorDomain.

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

使用

类 ara::exec::ExecErrorDomain 的成员函数 Name 同步提供一个指向基于字符的常量(const char *)的指针,该常量标识错误域 [SWS_EM_02287]。返回值遵循来自 [SWS_CORE_90023] 的 ara::exec::ExecErrorDomain 的定义。该方法通过头文件 ara/exec/exec_error_domain.h 引入,不期望任何传入参数,并作为常量成员函数在错误域的实例上操作 [SWS_EM_02287]。

错误处理与并发

该接口被声明为 noexcept,因此被分类为完全异常安全(exception safe)[SWS_EM_02287]。既不返回错误码,也不抛出异常。关于并发访问,该函数被指定为线程安全(thread-safe)[SWS_EM_02287]。因此,可以从不同线程并行执行调用,而无需额外的同步措施。

相互作用

通过声明为 override,该函数实现了在 [SWS_CORE_90023] 框架内查询域名的通用接口。返回的字符串想必用于在日志或诊断输出中清晰可读地标识错误域 [SWS_EM_02287]。 问题 Q-ae1f9de8510d7ff9 (未决)

本使用说明基于 AUTOSAR R25-11 规范自动生成。

Header-Datei#include "ara/exec/exec_error_domain.h"
Scopeclass ara::exec::ExecErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
const char *As per ara::exec::ExecErrorDomain in [SWS_CORE_90023]

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

Record
AUTOSAR/AP/record/SWS_EM_02287
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02287@rel:R25-11#0dc474fc
Content hash
0dc474fc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02287
Status: valid/unmigrated Version: rel:R25-11#d23f457d 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_EM_02287@rel:R25-11#d23f457d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b151e5522026-09-30
  • R19-11rel:R19-11#dd6b66162026-10-14
  • R20-11rel:R20-11#e0b063ee2026-10-14
  • R21-11rel:R21-11#e0b063ee2026-10-14
  • R22-11rel:R22-11#06e546312026-10-14
  • R23-11rel:R23-11#20b3f0a42026-10-14
  • R24-11rel:R24-11#27688c332026-10-14
  • R25-11rel:R25-11#d23f457d2026-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_EM_02289] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130, RS_AP_00159

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

Creates a new instance of ExecException from errorCode and throws it as a C++ exception. As per [SWS_CORE_10304], this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.

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

错误域 ara::exec::ExecErrorDomain 的方法 ThrowAsException 用于基于已发生的错误码同步触发 C++ 异常 [SWS_EM_02289]。它接受对 errorCode(类型 const ara::core::ErrorCode &)的引用作为输入参数,从中实例化一个类型为 ExecException 的异常对象,并立即将其作为 C++ 异常抛出 [SWS_EM_02289]。该函数不返回任何返回值。

关于错误和运行时行为,需要注意以下几个方面:

  • 异常安全性:由于该函数的预期行为在于触发异常,因此它使用 noexcept(false) 进行注解,并且形式上被归类为非异常安全(not exception safe)[SWS_EM_02289]。因此,调用方必须准备好捕获或处理 ExecException。
  • 并发性:规范将该成员函数标识为线程安全(thread-safe)[SWS_EM_02289]。因此,可以从并发线程安全地调用它。
  • 工具链限制:根据 [SWS_CORE_10304],如果在编译器工具链中禁用了 C++ 异常,则 ThrowAsException 不参与重载解析 [SWS_EM_02289]。因此,在没有异常支持的环境中,该调用不可用。

本文由 AI 基于 AUTOSAR Adaptive Release R25-11 规范生成。

Header-Datei#include "ara/exec/exec_error_domain.h"
Scopeclass ara::exec::ExecErrorDomain
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_EM_02289
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02289@rel:R25-11#6e979b10
Content hash
6e979b10
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02289
Status: valid/unmigrated Version: rel:R25-11#47f06ef7 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_EM_02289@rel:R25-11#47f06ef7
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ff00346b2026-09-30
  • R19-11rel:R19-11#ddd84bb82026-10-14
  • R20-11rel:R20-11#e526d9662026-10-14
  • R21-11rel:R21-11#e526d9662026-10-14
  • R22-11rel:R22-11#bee94e392026-10-14
  • R23-11rel:R23-11#82b994f12026-10-14
  • R24-11rel:R24-11#f7406c9e2026-10-14
  • R25-11rel:R25-11#47f06ef72026-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