类 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.
用户指南人工智能生成 定义 Platform Health Management 的错误域,用于分配消息并抛出异常。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 61c82c26ab31
来源
未决问题(1)
摘要 详细
定义 Platform Health Management 的错误域,用于分配消息并抛出异常。
上下文
类 ara::phm::PhmErrorDomain 代表 AUTOSAR Adaptive Platform 内 Platform Health Management(PHM)的专用错误域。它公有继承自基础架构 ara::core::ErrorDomain 并声明为 final,从而防止进一步派生。其核心任务是封装 PHM 子系统的数值错误代码,将其嵌入到标准化上下文中,并提供与错误消息及错误处理类型的语义关联。通过方法 Name(),该类提供域的规范化标识符 [SWS_PHM_01248] 。此外,它还定义了用于错误处理的标准化接口别名:Errc 用作底层枚举格式 PhmErrc [SWS_PHM_01245] 的类型别名,而 Exception 引用领域特定异常 PhmException 的基类型 [SWS_PHM_01246] 。
生命周期
ara::phm::PhmErrorDomain 的实例化通过无参默认构造函数 PhmErrorDomain() [SWS_PHM_01247] 进行。该构造函数被限定为 noexcept,并按规范归类为异常安全(exception safe )和线程安全 [SWS_PHM_01247] 。在典型的运行时场景中,错误域的实例通常应作为长寿命对象(单例)在进程范围内可用,以便应用程序和内部 PHM 组件共享同一个实例。 问题 Q-6b33f78e8f3b3e08 (未决) 该类的所有无状态查询函数——尤其是 Name() 和 Message()——均声明为 const noexcept 且完全线程安全 [SWS_PHM_01248] ,[SWS_PHM_01249] 。因此,可以从多个并行控制流中查询错误描述,而无需外部同步。
使用路径
如果在监视或管理系统状态时发生错误,PHM 子系统会生成相应的错误代码,该代码通常在引用 PhmErrorDomain 的情况下封装为 ara::core::ErrorCode 传递给调用方。接收方应用软件可以根据该域检查发生的错误是否来自健康管理。为了进行诊断和记录,它会调用方法 Message(errorCode),该方法针对传入的代码以 const char* 形式返回相关的文本消息 [SWS_PHM_01249] 。如果应用程序通过异常处理来处理失败的操作,则会将 ara::core::ErrorCode 传递给 ThrowAsException(errorCode),以抛出关联的异常 [SWS_PHM_01250] 。
通过 PhmErrorDomain 进行错误解析的流程 应用 PHM-Dienst PhmErrorDomain 调用监控函数() Erzeugt ara::core::ErrorCode (Errc) 返回 ErrorCode Use Case: Fehlertext ermitteln Message(errorCode) Fehlermeldung (const char*) opt Exceptions aktiviert ThrowAsException(errorCode) throw PhmException
时序图:通过 PhmErrorDomain 进行错误检查和异常抛出的典型流程。来源:[SWS_PHM_01245] 、[SWS_PHM_01246] 、[SWS_PHM_01249] 、[SWS_PHM_01250]
错误场景
将错误代码显式转换为 C++ 异常是通过方法 ThrowAsException(errorCode) 实现的 [SWS_PHM_01250] 。抛出的异常对应于类型 Exception,该类型映射到 PhmException [SWS_PHM_01246] 。由于该函数按设计抛出异常,因此它在规范中被指明为非异常安全(not exception safe ),但在调用方面仍保持线程安全 [SWS_PHM_01250] 。对于没有异常处理的环境,存在一个重要的约束条件:如果在编译器中禁用了 C++ 异常,则 ThrowAsException 不参与重载解析 [SWS_PHM_01250] 。在此模式下,调用方必须通过方法 Message() 和错误代码的返回值纯粹基于值来处理错误 [SWS_PHM_01249] 。
本指南基于 Adaptive Platform Release R25-11 的 AUTOSAR 规范。
分组依据 类别 历史
成员图 类图 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
详细视图 此版本没有元素数据
构造函数和析构函数 Creates a PhmErrorDomain instance.
PhmErrorDomain () noexcept;
方法 Returns the message associated with the error code.
const char * Message (CodeType errorCode) const noexcept override;
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.
类型别名 Alias for the error code value enumeration.
Alias for the exception base class.
点击条目以查看其关系。
基类 派生类 使用 被使用于 继承 自此版本起移除 用于 此类中无关联 函数 AI 评注 打开类页面 无法加载类页面。 调整顺序 调整宽度 调整大纲宽度 章节 阅读时间 SWS 引用 图表 放回中间 调整顺序或拖到标题栏 取消停靠 – 在内容中显示 移到中间栏 作为标签停靠到标题栏 元素 AI 模型 打开审计档案 档案 打开简短版本 打开中等版本 打开完整版本 恢复默认视图 已恢复默认视图 撤销 关闭详细视图 签名 基本信息 值 截至所选版本的最后一次更改 之后的下一次更改 单击:选择版本 无法放在此处:拖到标题栏可停靠,拖到中间栏可取消停靠。 新增 已更改 未更改 已移除 未包含 更改 内容无变化 首次出现于 移除于 没有可用的版本数据。 正在加载版本数据 … 文本 此版本未收录措辞 悬停或单击单元格:与所选版本比较 · 单击版本标题:选择版本 选择版本 属性 版本 元素 只有一个版本有措辞 PDF 中存在,原文尚未导入 首次采集原文 自 {rel} 起未更改 版本颜色 最早版本 最新版本
方法文档
const char * Message (CodeType errorCode) const noexcept override;
Returns the message associated with the error code.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 9377332e8cc7
来源
未决问题(1)
类 ara::phm::PhmErrorDomain 的成员函数 Message 针对传入的类型为 CodeType 的错误编号 errorCode,将关联错误消息的文本描述作为 const char * 返回 [SWS_PHM_01249] 。该函数通过头文件 ara/phm/phm_error_domain.h 提供,并作为虚方法(override)重写了用于错误解析的默认接口行为 [SWS_PHM_01249] 。
对于调用上下文和执行语义,适用以下规定:
在 Platform Health Management(PHM)中,该方法用于将 PhmErrorDomain 的数字错误码转换为人类可读的字符串,以用于日志记录或诊断目的 [SWS_PHM_01249] 。
本文由 AI 生成,仅供参考。唯一具有约束力的是官方 AUTOSAR 规范。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c3932fe39b72
来源
未决问题(1)
使用方法
函数 Message 属于类 ara::phm::PhmErrorDomain 的成员函数,声明于头文件 #include "ara/phm/phm_error_domain.h" 中,用于获取与指定错误码相对应的描述文本 [SWS_PHM_01249] 。调用方需通过入参 errorCode(类型为 CodeType)传入错误代码编号,函数以同步调用方式执行,并返回一个指向错误描述字符串的 const char * 指针 [SWS_PHM_01249] 。
并发与执行安全
该函数在执行安全与并发方面具备明确的规范保证:
线程安全性 :该函数被明确定义为线程安全(thread-safe),支持多个并发上下文或线程同时调用以解析错误文本 [SWS_PHM_01249] 。
异常安全性 :该函数具备异常安全性(exception safe),其方法签名带有 noexcept 和 const 修饰符,且作为重写虚函数(override)执行,确保在任何错误处理路径中均不会抛出异常 [SWS_PHM_01249] 。
本说明由人工智能辅助生成,内容仅基于 AUTOSAR 规范有效载荷。
Header-Datei #include "ara/phm/phm_error_domain.h" Scope class ara::phm::PhmErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Parameter (in)
Parameter Beschreibung errorCode The error code number.
Rückgabewert
Typ Beschreibung const char * The message associated with the error code.
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:
Release:
R25-11 (Current / Active) R22-11 R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (5):
R25-11 rel:R25-11#29a23c2e2026-09-30 Inspect R22-11 rel:R22-11#d28a09b52026-10-14 Inspect R23-11 rel:R23-11#fb2533e82026-10-14 Inspect R24-11 rel:R24-11#87e7affe2026-10-14 Inspect R25-11 rel:R25-11#87e7affe2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
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/unmigratedmechanically 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;
Returns the name of the error domain.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ae1e33120f1a
来源
本使用说明基于 AUTOSAR 规范 R25-11 自动生成。
Header-Datei #include "ara/phm/phm_error_domain.h" Scope class ara::phm::PhmErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
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:
Release:
R25-11 (Current / Active) R22-11 R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (5):
R25-11 rel:R25-11#08e28bf82026-09-30 Inspect R22-11 rel:R22-11#3d1a89cc2026-10-14 Inspect R23-11 rel:R23-11#13db17322026-10-14 Inspect R24-11 rel:R24-11#0999648f2026-10-14 Inspect R25-11 rel:R25-11#87eea56a2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
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/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
PhmErrorDomain () noexcept;
Creates a PhmErrorDomain instance.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0eccae6e5543
来源
未决问题(1)
本使用说明基于来自 AUTOSAR Adaptive R25-11 的规范数据自动生成。
实现者指南即将推出(复杂度 I1)
Header-Datei #include "ara/phm/phm_error_domain.h" Scope class ara::phm::PhmErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
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:
Release:
R25-11 (Current / Active) R22-11 R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (5):
R25-11 rel:R25-11#c16054342026-09-30 Inspect R22-11 rel:R22-11#1e02ca242026-10-14 Inspect R23-11 rel:R23-11#6c11e67c2026-10-14 Inspect R24-11 rel:R24-11#e616a4472026-10-14 Inspect R25-11 rel:R25-11#e616a4472026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
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/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
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 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2438d348b5ed
来源
本使用说明由自动生成,基于 AUTOSAR Adaptive R25-11 规范。
Header-Datei #include "ara/phm/phm_error_domain.h" Scope class ara::phm::PhmErrorDomain Exception-Sicherheit not exception safe Thread-Sicherheit thread-safe
Parameter (in)
Parameter Beschreibung errorCode The error to throw.
Rückgabewert
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:
Release:
R25-11 (Current / Active) R22-11 R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (5):
R25-11 rel:R25-11#98735c902026-09-30 Inspect R22-11 rel:R22-11#ca4e4bdf2026-10-14 Inspect R23-11 rel:R23-11#1075311f2026-10-14 Inspect R24-11 rel:R24-11#7f33d0e72026-10-14 Inspect R25-11 rel:R25-11#7f33d0e72026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
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/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
类型别名文档
using Errc = PhmErrc ;
Alias for the error code value enumeration.
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:
Release:
R25-11 (Current / Active) R22-11 R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (5):
R25-11 rel:R25-11#82e44aca2026-09-30 Inspect R22-11 rel:R22-11#86c185582026-10-14 Inspect R23-11 rel:R23-11#69dedf2e2026-10-14 Inspect R24-11 rel:R24-11#69dedf2e2026-10-14 Inspect R25-11 rel:R25-11#69dedf2e2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
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/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
using Exception = PhmException ;
Alias for the exception base class.
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:
Release:
R25-11 (Current / Active) R22-11 R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (5):
R25-11 rel:R25-11#e2b0390c2026-09-30 Inspect R22-11 rel:R22-11#c46a9c8a2026-10-14 Inspect R23-11 rel:R23-11#3b0710ff2026-10-14 Inspect R24-11 rel:R24-11#3b0710ff2026-10-14 Inspect R25-11 rel:R25-11#3b0710ff2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
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/unmigratedmechanically 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 · 德文原文