DEENESPTFRRUARHIKOZHNL

فئة ara::per::PerErrorDomain

[SWS_PER_00312] Upstream: RS_AP_00122, RS_AP_00127, RS_AP_00140

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

Defines the error domain for Persistency.

Header-Datei#include "ara/per/per_error_domain.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per
Basisklasse(n)ara::core::ErrorDomain
Unique IDAs per ara::per::PerErrorDomain in [SWS_CORE_90023]

دليل المستخدممولَّد بالذكاء الاصطناعي

يُحدّد مجال الخطأ الخاص بوحدة الاستمرارية لتوفير رموز الأخطاء والأوصاف النصية والاستثناءات.
مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: da81ed3d3cb6 المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

يُحدّد مجال الخطأ الخاص بوحدة الاستمرارية لتوفير رموز الأخطاء والأوصاف النصية والاستثناءات.

تُحدّد الفئة ara::per::PerErrorDomain مجال الخطأ الخاص بوحدة الاستمرارية وتربط رموز الأخطاء برسائل وصفية وأنواع استثناءات [SWS_PER_00411]. وهي تتيح عبر واجهات آمنة خيطيًا الاستعلامَ عن اسم المجال وترجمة أوصاف الأخطاء لقيم أخطاء محددة. وعند الحاجة، تقوم بتحويل الأخطاء عبر ThrowAsException() إلى استثناءات C++‎ [SWS_PER_00350]. وفي حال تعطيل الاستثناءات في حزمة أدوات المترجم، فإن دالة الإطلاق هذه لا تكون متاحة، مما يفرض إجراء فحص الأخطاء بالاعتماد التام على قيم الإرجاع.

السياق

تُحدّد الفئة ara::per::PerErrorDomain مجال الخطأ الخاص بوحدة الاستمرارية (Persistency) ضمن AUTOSAR Adaptive Platform. وهي ترث من تعريف النوع الأساسي ara::core::ErrorDomain ومُصرّح عنها كـ final، لتشكل بذلك الأساس للمعالجة المميّزة بالنوع للأخطاء وتعيين الأخطاء لكافة العمليات المتعلقة بالاستمرارية. وعبر الأسماء البديلة القياسية للأنواع Errc [SWS_PER_00411] لتعداد رموز الأخطاء الأساسي PerErrc وException [SWS_PER_00412] للفئة الأساسية للاستثناء الخاصة بالوحدة PerException، تربط الفئة بين قيم الأخطاء العددية ورسائل الخطأ الواضحة وكائنات استثناءات C++‎ الملموسة. وفي معمارية المنصة، يتفاعل مجال الخطأ تفاعلاً وثيقًا مع خدمات Persistency ومجموعات الوظائف المستدعية وبنى النتائج والأخطاء العامة من ara::core.

دورة الحياة

يتم إنشاء المثيل عبر المنشئ الافتراضي القياسي PerErrorDomain() [SWS_PER_00313]. هذا المنشئ مُصرّح عنه كـ noexcept، وهو آمن استثنائيًا (exception safe) وآمن خيطيًا (thread-safe) بالكامل. تفسير: يُرجّح أن يُدار مثيل PerErrorDomain عادةً ككائن طويل الأمد أو كائن عام، لضمان إجراء مقارنات متسقة للمجال وترجمة أنواع أخطاء Persistency طوال فترة التشغيل. سؤال Q-5d90982fddec40a7 (مفتوح) ونظرًا لتصنيف كافة عمليات الاستعلام في الفئة بأنها آمنة خيطيًا أيضًا، يمكن لعدة خيوط الوصول بشكل متوازٍ إلى مثيل المجال نفسه دون الحاجة إلى آليات مزامنة إضافية على مستوى جهة الاستدعاء.

مسار الاستخدام

يتضمن مسار الاستخدام النموذجي التعرف على المجال، والاستعلام عن معلومات تشخيصية واضحة، وإطلاق الاستثناءات اختياريًا عند حدوث أخطاء في وحدة Persistency. أولاً، تُرجع الدالة العضو Name() المعرّف الفريد لمجال الخطأ كسلسلة نصية [SWS_PER_00314]؛ وهي محددة بأنها noexcept وآمنة استثنائيًا وآمنة خيطيًا. وفي حال حدوث خطأ أثناء عملية استمرارية، يتم تحليل قيمة خطئه العددية عبر Message() [SWS_PER_00315]. تستقبل هذه الدالة رمز الخطأ العددي من النوع CodeType وتُرجع رسالة الخطأ المقترنة به كمؤشر أحرف ثابت (const char *)، وذلك أيضًا مع ضمان الأمان الاستثنائي والخيطي الكاملين.

إذا كان يلزم تحويل حالة خطأ إلى استثناء C++‎، تُستخدم الدالة ThrowAsException() [SWS_PER_00350]. يوضح التسلسل التالي التفاعل القائم عند الاستعلام عن الأخطاء وإطلاق الاستثناءات:

الاستعلام عن الخطأ وإطلاق الاستثناء في PerErrorDomainالتطبيقPersistenzLaufzeitPerErrorDomainتنفيذ عملية الاستدامة()إرجاع رمز الخطأ / ResultMessage(errorCode)const char * (Fehlernachricht)optمعالجة الاستثناءات مطلوبةThrowAsException(errorCode)throw PerException

مخطط تسلسلي: المسار النموذجي لفحص الأخطاء والاستعلام عن النصوص وإطلاق الاستثناءات عبر PerErrorDomain. المصادر: [SWS_PER_00314]، [SWS_PER_00315]، [SWS_PER_00350].

سيناريوهات الأخطاء

عند الاستخدام العملي لـ ara::per::PerErrorDomain، يجب على المطورين مراعاة الضمانات المختلفة المتعلقة بمعالجة الأخطاء والأمان الاستثنائي. فبينما صُرّح عن واجهات الاستعلام Name() [SWS_PER_00314] وMessage() [SWS_PER_00315] بصرامة كـ noexcept وصُنّفت بأنها آمنة استثنائيًا، تُعد الدالة العضو ThrowAsException() غير آمنة استثنائيًا (not exception safe) [SWS_PER_00350]. ولهذا السلوك ما يبرره دلاليًا، حيث يكمن الغرض من الدالة في الإطلاق الموجّه لاستثناء يطابق رمز الخطأ (noexcept(false)).

يتعلق أحد الشروط الحدية الجوهرية بالمنصات أو تكوينات البناء التي لا تحتوي على استثناءات C++‎ مفعّلة: إذا كانت معالجة الاستثناءات معطلة في المترجم، فإن ThrowAsException() لا تشارك في حل التحميل الزائد وفقًا لـ [SWS_PER_00350]. وفي بيئات كهذه، يتعين على برمجيات التطبيق اللجوء إلى تقييم رموز الأخطاء عبر الأسماء البديلة المتوفرة Errc [SWS_PER_00411] والأوصاف النصية لـ Message() [SWS_PER_00315]، بدلاً من اعتراض كائنات استثناءات من النوع Exception [SWS_PER_00412].

أُنشئ هذا الدليل تلقائيًا بناءً على متطلبات مواصفات AUTOSAR.

خريطة الأعضاء

المُنشئات والمُتلف

1

الدوال الأعضاء

3

أسماء الأنواع البديلة

2

مخطط الفئة

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

G nara__per__PerErrorDomain979 PerErrorDomain + PerErrorDomain() + Message() + Name() + ThrowAsException() nara__core__ErrorDomain335 ErrorDomain nara__per__PerErrorDomain979->nara__core__ErrorDomain335

عرض التفاصيل

اختر عنصرًا من المخطط.

المُنشئات والمُتلف

Creates a PerErrorDomain instance.

PerErrorDomain () noexcept;

الدوال الأعضاء

Message دالة

Returns the message associated with the error code.

const char * Message (CodeType errorCode) const noexcept override;
Name دالة

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.

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

أسماء الأنواع البديلة

Errc اسم نوع بديل

Alias for the error code value enumeration.

using Errc = PerErrc;
Exception اسم نوع بديل

Alias for the exception base class.

توثيق الدوال

دالة Message [SWS_PER_00315] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00159

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

Returns the message associated with the error code.

Header-Datei#include "ara/per/per_error_domain.h"
Scopeclass ara::per::PerErrorDomain
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_PER_00315
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00315@rel:R25-11#a78fefdd
Content hash
a78fefdd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00315
Status: valid/unmigrated Version: rel:R25-11#b3b0e84a 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_PER_00315@rel:R25-11#b3b0e84a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#dcf865cc2026-09-30
  • R19-11rel:R19-11#fa40c0592026-10-14
  • R20-11rel:R20-11#482223252026-10-14
  • R21-11rel:R21-11#4762f8102026-10-14
  • R22-11rel:R22-11#03cd14022026-10-14
  • R23-11rel:R23-11#d69d63782026-10-14
  • R24-11rel:R24-11#b3b0e84a2026-10-14
  • R25-11rel:R25-11#b3b0e84a2026-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_PER_00314] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00159

const char * Name () const noexcept override;

Returns the name of the error domain.

Header-Datei#include "ara/per/per_error_domain.h"
Scopeclass ara::per::PerErrorDomain
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
const char *As per ara::per::PerErrorDomain in [SWS_CORE_90023].

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

Record
AUTOSAR/AP/record/SWS_PER_00314
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00314@rel:R25-11#e3f62cfd
Content hash
e3f62cfd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00314
Status: valid/unmigrated Version: rel:R25-11#bbc9c834 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_PER_00314@rel:R25-11#bbc9c834
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8efa8b412026-09-30
  • R19-11rel:R19-11#157f07862026-10-14
  • R20-11rel:R20-11#578706942026-10-14
  • R21-11rel:R21-11#578706942026-10-14
  • R22-11rel:R22-11#7e3ba2a72026-10-14
  • R23-11rel:R23-11#4ed7a81d2026-10-14
  • R24-11rel:R24-11#f4d2bd532026-10-14
  • R25-11rel:R25-11#bbc9c8342026-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

دالة PerErrorDomain [SWS_PER_00313] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00159

PerErrorDomain () noexcept;

Creates a PerErrorDomain instance.

Header-Datei#include "ara/per/per_error_domain.h"
Scopeclass ara::per::PerErrorDomain
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_PER_00313
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00313@rel:R25-11#6140b605
Content hash
6140b605
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00313
Status: valid/unmigrated Version: rel:R25-11#676bd5fe 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_PER_00313@rel:R25-11#676bd5fe
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2fe03ca62026-09-30
  • R19-11rel:R19-11#493784652026-10-14
  • R20-11rel:R20-11#e90ad4282026-10-14
  • R21-11rel:R21-11#4fed90922026-10-14
  • R22-11rel:R22-11#c86bdbe02026-10-14
  • R23-11rel:R23-11#07bddb402026-10-14
  • R24-11rel:R24-11#676bd5fe2026-10-14
  • R25-11rel:R25-11#676bd5fe2026-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_PER_00350] Upstream: RS_AP_00120, RS_AP_00121

void ThrowAsException (const ara::core::ErrorCode &errorCode) const noexcept(false) 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.

Header-Datei#include "ara/per/per_error_domain.h"
Scopeclass ara::per::PerErrorDomain
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_PER_00350
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00350@rel:R25-11#a75aaf56
Content hash
a75aaf56
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00350
Status: valid/unmigrated Version: rel:R25-11#d5cad670 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_PER_00350@rel:R25-11#d5cad670
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ac2c50332026-09-30
  • R19-11rel:R19-11#08d8b5132026-10-14
  • R20-11rel:R20-11#bcef1c2f2026-10-14
  • R21-11rel:R21-11#bcef1c2f2026-10-14
  • R22-11rel:R22-11#855e1f712026-10-14
  • R23-11rel:R23-11#a44240ed2026-10-14
  • R24-11rel:R24-11#d5cad6702026-10-14
  • R25-11rel:R25-11#d5cad6702026-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

توثيق أسماء الأنواع البديلة

اسم نوع بديل Errc [SWS_PER_00411] Upstream: RS_AP_00122

using Errc = PerErrc;

Alias for the error code value enumeration.

Header-Datei#include "ara/per/per_error_domain.h"
Scopeclass ara::per::PerErrorDomain
SymbolErrc

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

Record
AUTOSAR/AP/record/SWS_PER_00411
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00411@rel:R25-11#07147c01
Content hash
07147c01
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00411
Status: valid/unmigrated Version: rel:R25-11#9d0ddf8d Versionshistorie & Revisions (1 transition, 7 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_PER_00411@rel:R25-11#9d0ddf8d
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#78fe22022026-09-30
  • R20-11rel:R20-11#39e744882026-10-14
  • R21-11rel:R21-11#39e744882026-10-14
  • R22-11rel:R22-11#8f96934a2026-10-14
  • R23-11rel:R23-11#9d0ddf8d2026-10-14
  • R24-11rel:R24-11#9d0ddf8d2026-10-14
  • R25-11rel:R25-11#9d0ddf8d2026-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

اسم نوع بديل Exception [SWS_PER_00412] Upstream: RS_AP_00122

using Exception = PerException;

Alias for the exception base class.

Header-Datei#include "ara/per/per_error_domain.h"
Scopeclass ara::per::PerErrorDomain
SymbolException

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

Record
AUTOSAR/AP/record/SWS_PER_00412
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00412@rel:R25-11#357e8f77
Content hash
357e8f77
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00412
Status: valid/unmigrated Version: rel:R25-11#12539c4d Versionshistorie & Revisions (1 transition, 7 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_PER_00412@rel:R25-11#12539c4d
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#0875fcdc2026-09-30
  • R20-11rel:R20-11#e88607572026-10-14
  • R21-11rel:R21-11#e88607572026-10-14
  • R22-11rel:R22-11#b0bd04f32026-10-14
  • R23-11rel:R23-11#12539c4d2026-10-14
  • R24-11rel:R24-11#12539c4d2026-10-14
  • R25-11rel:R25-11#12539c4d2026-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