DEENESPTFRRUARHIKOZHNL

클래스 ara::core::ErrorCode

[SWS_CORE_00501] Upstream: RS_AP_00130, RS_AP_00140

class ErrorCode final {...};

Encapsulation of an error code. An ErrorCode contains a raw error code value and an Error Domain. The raw error code value is specific to this ErrorDomain.

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

사용자 가이드AI 생성

도메인별 오류 코드 및 추가 데이터를 캡슐화하여 평가하거나 C++ 예외로 변환합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 747258139aa5 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

도메인별 오류 코드 및 추가 데이터를 캡슐화하여 평가하거나 C++ 예외로 변환합니다.

ara::core::ErrorCode 클래스는 도메인별 원시 오류 값을 관련 오류 도메인 및 선택적 컨텍스트 데이터와 함께 캡슐화합니다[SWS_CORE_00513]. 이를 통해 오류 코드 및 설명 텍스트를 예외로부터 안전하게 읽을 수 있을 뿐만 아니라 ThrowAsException() [SWS_CORE_00518], [SWS_CORE_00519]을(를) 통해 필요에 따라 유형별 C++ 예외로 전달할 수 있습니다. C++ 예외가 툴체인 측에서 비활성화된 경우 예외 인터페이스는 오버로드 확인에서 자동으로 제외됩니다[SWS_CORE_00519].

컨텍스트

ara::core::ErrorCode 클래스는 AUTOSAR Adaptive Platform에서 오류 정보의 중앙 캡슐화 역할을 합니다. 오류 코드는 항상 ErrorDomain::CodeType 유형의 도메인별 원시 오류 값을 연관된 오류 도메인 ara::core::ErrorDomain [SWS_CORE_00513]과(와) 묶습니다. 오류 도메인은 원시 값을 해석해야 하는 의미론적 컨텍스트를 정의하고 숫자 코드와 비즈니스 의미 간의 연결을 설정합니다[SWS_CORE_00515]. 또한 ErrorCode은(는) 동적 메모리 할당 없이 오류 발생에 대한 확장된 컨텍스트를 제공하기 위해 ErrorDomain::SupportDataType 유형의 제조업체별 추가 데이터를 수용할 수 있습니다[SWS_CORE_00516].

수명 주기

ErrorCode의 인스턴스화는 열거 가능한 유형을 통하거나 원시 값과 오류 도메인을 명시적으로 지정하여 수행됩니다. 형식 안전 열거형 값의 경우 인수가 C++ 열거형 유형인 경우에만 SFINAE를 통해 오버로드 확인에 참여하는 생성자 템플릿이 존재합니다[SWS_CORE_00512]. 대안으로 직접 생성자는 숫자 원시 값, 담당 ErrorDomain에 대한 참조 및 선택적 추가 데이터를 허용합니다[SWS_CORE_00513].

두 생성자 모두 constexpr 및 noexcept(으)로 선언되어 있습니다. 이는 생성 시 완전한 예외 안전성을 보증하며 컴파일 타임에 이미 구성될 수 있도록 허용합니다[SWS_CORE_00512], [SWS_CORE_00513]. 해석: ErrorCode은(는) 기본 데이터와 수명이 긴 도메인에 대한 참조만을 관리하므로, 자유롭게 복사되고 스레드 간에 읽을 수 있는 경량 값 유형으로 작동합니다. 질문 Q-8ac788b51fb75a1c (열림) 모든 관찰 작업은 스레드로부터 안전하고 예외로부터 안전한 것으로 지정되어 있습니다[SWS_CORE_00514], [SWS_CORE_00515].

사용 경로

일반적인 사용 흐름에는 오류 상태 감지 시 생성, 호출자에 의한 관련 메타데이터 검사, 필요한 경우 예외 처리로의 전달이 포함됩니다.

  • 생성: 도메인별 열거형 값 및 선택적 컨텍스트 데이터를 통해 오류가 구성됩니다[SWS_CORE_00512].
  • 식별: 호출자는 Value() [SWS_CORE_00514]을(를) 통해 숫자 원시 값을 쿼리하고 Domain() [SWS_CORE_00515]을(를) 통해 연관된 오류 도메인을 쿼리합니다.
  • 진단: 보완적인 제조업체별 데이터는 SupportData()을(를) 통해 읽는 반면[SWS_CORE_00516], Message()은(는) 사람이 읽을 수 있는 설명을 StringView(으)로 제공합니다[SWS_CORE_00518].
  • 예외 발생: 오류를 예외 기반 제어 구조로 전파해야 하는 경우, 호출자는 ThrowAsException()을(를) 통해 관련 예외를 트리거합니다[SWS_CORE_00519].
오류 검사 및 예외 발생의 일반적인 흐름애플리케이션ErrorCodeErrorDomainErrorCode(e, data)Value() / Message()Rohwert / Beschreibungopt예외 처리를 원함ThrowAsException()ThrowAsException(*this)

시퀀스 다이어그램: 생성에서 검사를 거쳐 오류 도메인의 예외 처리로의 위임에 이르는 일반적인 호출 순서. 출처: [SWS_CORE_00512], [SWS_CORE_00514], [SWS_CORE_00518], [SWS_CORE_00519].

오류 시나리오

ara::core::ErrorCode 클래스는 예외 없는 오류 관리와 예외 기반 오류 관리 사이의 가교 역할을 합니다. Value(), Domain(), SupportData() 및 Message() 메서드는 noexcept 보증을 가지며 리소스 병목 현상 아래에서도 후속 오류의 위험 없이 호출될 수 있습니다[SWS_CORE_00514], [SWS_CORE_00515], [SWS_CORE_00516], [SWS_CORE_00518].

독립적인 오류 시나리오는 명시적으로 noexcept(false) 및 not exception safe(으)로 선언된 ThrowAsException() 메서드입니다[SWS_CORE_00519]. 이 동작은 호출 this->Domain().ThrowAsException(*this)에 해당합니다. 즉, 연결된 ErrorDomain을(를) 통해 적절한 예외 유형을 확인하고 현재 ErrorCode 인스턴스를 캡슐화하는 예외를 발생시킵니다[SWS_CORE_00519]. 중요한 제약 조건 중 하나는 컴파일러 툴체인에서 C++ 예외가 비활성화된 경우 ThrowAsException()이(가) 오버로드 확인에 참여하지 않는다는 것입니다[SWS_CORE_00519].

AUTOSAR Adaptive Platform R25-11을 기반으로 autodocs-AI에 의해 생성되었습니다.

멤버 맵

클래스 다이어그램

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

G nara__core__ErrorCode330 ErrorCode + ErrorCode() + Domain() + Message() + SupportData() + ThrowAsException() + Value()

상세 보기

개요에서 항목을 선택하세요.

생성자 및 소멸자

ErrorCode 함수 2

Construct a new ErrorCode instance with parameters

오버로드 ErrorCode 2
template <typename EnumT> constexpr ErrorCode (EnumT e, ErrorDomain::SupportDataType data=Error Domain::SupportDataType()) noexcept; SWS_CORE_00512
constexpr ErrorCode (ErrorDomain::CodeType value, const ErrorDomain &domain, ErrorDomain::SupportDataType data=ErrorDomain::SupportData Type()) noexcept; SWS_CORE_00513

메서드

Domain 함수

Return the ErrorDomain with which this ErrorCode is associated

constexpr const ErrorDomain & Domain () const noexcept;
Message 함수

Return a textual representation of this ErrorCode

StringView Message () const noexcept;

Return the supplementary error context data

constexpr ErrorDomain::SupportDataType SupportData () const noexcept;

Throw this error as exception.

void ThrowAsException () const noexcept(false);
Value 함수

Return the raw error code value

constexpr ErrorDomain::CodeType Value () const noexcept;

메서드 문서

함수 Domain [SWS_CORE_00515] Upstream: RS_AP_00130

constexpr const ErrorDomain & Domain () const noexcept;

Return the ErrorDomain with which this ErrorCode is associated

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

Rückgabewert

TypBeschreibung
const ErrorDomain &the ErrorDomain

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

Record
AUTOSAR/AP/record/SWS_CORE_00515
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00515@rel:R25-11#f303d811
Content hash
f303d811
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00515
Status: valid/unmigrated Version: rel:R25-11#1831743f 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_00515@rel:R25-11#1831743f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#fa6f8b092026-09-30
  • R19-11rel:R19-11#4254a20d2026-10-14
  • R20-11rel:R20-11#6403e3792026-10-14
  • R21-11rel:R21-11#6403e3792026-10-14
  • R22-11rel:R22-11#cdc632ba2026-10-14
  • R23-11rel:R23-11#01e4faa02026-10-14
  • R24-11rel:R24-11#cdddf8862026-10-14
  • R25-11rel:R25-11#1831743f2026-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

함수 ErrorCode [SWS_CORE_00512] Upstream: RS_AP_00130

template <typename EnumT> constexpr ErrorCode (EnumT e, ErrorDomain::SupportDataType data=Error Domain::SupportDataType()) noexcept;

Construct a new ErrorCode instance with parameters

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: aa921d126307 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

템플릿 생성자 ErrorCode은(는) 헤더 파일 ara/core/error_code.h의 클래스 ara::core::ErrorCode 내에서 오류 설명을 동기적으로 인스턴스화합니다 [SWS_CORE_00512]. 이 생성자는 열거형 타입 EnumT의 도메인 고유 오류 코드 값 e 및 기본적으로 비어 있는 상태로 초기화되는 ErrorDomain::SupportDataType 타입의 선택적 공급업체 고유 추가 데이터 data을(를) 받습니다 [SWS_CORE_00512]. 주요 제한 사항으로, 생성자는 SFINAE를 통해 EnumT이(가) 실제로 열거형 타입인 경우에만 오버로드 확인(overload resolution)에 참여합니다 [SWS_CORE_00512]. 명시적 도메인 전달을 사용하는 대체 오버로드 [SWS_CORE_00513]과(와) 달리, 적절한 ErrorDomain(으)로의 할당은 타입 EnumT을(를) 기반으로 암시적으로 도출될 것으로 추정됩니다. 질문 Q-83bc8268971748ff (열림)

동시성 및 오류 안전성과 관련하여, 생성자는 스레드 안전(thread-safe) 및 완전한 예외 안전(exception safe)(으)로 명시되어 있으며 noexcept(으)로 선언되어 있습니다 [SWS_CORE_00512]. constexpr 한정자를 통해 컴파일 타임에 상수 표현식에서 이미 인스턴스화가 수행될 수 있습니다 [SWS_CORE_00512]. 생성에 대해 특정 DET 또는 DEM 오류 메시지는 정의되어 있지 않습니다. 표현된 오류가 추가 제어 흐름에서 예외로 신호되어야 하는 경우, 생성된 인스턴스는 적절한 예외 타입을 확인하고 발생시키는 메서드 ThrowAsException()을(를) 제공하며 [SWS_CORE_00519], 이에 상응하여 오류 도메인도 예외를 직접 발생시킬 수 있습니다 [SWS_CORE_00154].

전체 시스템과의 상호작용에서 객체의 속성은 메서드 Value() [SWS_CORE_00514], Domain() [SWS_CORE_00515], SupportData() [SWS_CORE_00516] 및 텍스트 표현 Message() [SWS_CORE_00518]을(를) 통해 조회할 수 있습니다. operator== [SWS_CORE_00571] 및 operator!= [SWS_CORE_00572]을(를) 통한 값 비교 시 Value() 및 Domain()만 고려되는 반면, SupportData()은(는) 고려되지 않습니다 [SWS_CORE_00571]. 또한 생성된 객체는 ara::core::Exception [SWS_CORE_00611](Error() [SWS_CORE_00613]을(를) 통해 읽기 가능), ara::core::CoreException [SWS_CORE_05212] 또는 ara::core::FutureException [SWS_CORE_00412]과(와) 같은 표준화된 예외 객체에서 캡슐화를 위한 기반 역할을 합니다.

참고: 이 사용 지침은 인공지능에 의해 생성되었으며 릴리스 R25-11의 명세만을 기반으로 합니다.

구현자 가이드 준비 중 (복잡도 I2)

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

Template-Parameter

ParameterBeschreibung
EnumTan enum type that contains error code values

Parameter (in)

ParameterBeschreibung
ea domain-specific error code value
dataoptional vendor-specific supplementary error context data
Hinweise: This constructor does not participate in overload resolution unless EnumT is an enum type

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

Record
AUTOSAR/AP/record/SWS_CORE_00512
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00512@rel:R25-11#995d2949
Content hash
995d2949
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00512
Status: valid/unmigrated Version: rel:R25-11#e675e476 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_00512@rel:R25-11#e675e476
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#5864b7a32026-09-30
  • R19-11rel:R19-11#0fbb118e2026-10-14
  • R20-11rel:R20-11#6b3bdb972026-10-14
  • R21-11rel:R21-11#6b3bdb972026-10-14
  • R22-11rel:R22-11#e0d2de622026-10-14
  • R23-11rel:R23-11#3805383a2026-10-14
  • R24-11rel:R24-11#69cb1f702026-10-14
  • R25-11rel:R25-11#e675e4762026-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

함수 ErrorCode [SWS_CORE_00513] Upstream: RS_AP_00130

constexpr ErrorCode (ErrorDomain::CodeType value, const ErrorDomain &domain, ErrorDomain::SupportDataType data=ErrorDomain::SupportData Type()) noexcept;

Construct a new ErrorCode instance with parameters

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

Parameter (in)

ParameterBeschreibung
valuea domain-specific error code value
domainthe ErrorDomain associated with value
dataoptional vendor-specific supplementary error context data

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

Record
AUTOSAR/AP/record/SWS_CORE_00513
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00513@rel:R25-11#a6e7bac1
Content hash
a6e7bac1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00513
Status: valid/unmigrated Version: rel:R25-11#09ef777c 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_00513@rel:R25-11#09ef777c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#444e84e12026-09-30
  • R19-11rel:R19-11#1a70fc152026-10-14
  • R20-11rel:R20-11#9d20b01c2026-10-14
  • R21-11rel:R21-11#6f3b40692026-10-14
  • R22-11rel:R22-11#b18520df2026-10-14
  • R23-11rel:R23-11#599a0f832026-10-14
  • R24-11rel:R24-11#431bfc2a2026-10-14
  • R25-11rel:R25-11#09ef777c2026-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_00518] Upstream: RS_AP_00130

StringView Message () const noexcept;

Return a textual representation of this ErrorCode

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

Rückgabewert

TypBeschreibung
StringViewThe description text of the error message

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

Record
AUTOSAR/AP/record/SWS_CORE_00518
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00518@rel:R25-11#289e9f5b
Content hash
289e9f5b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00518
Status: valid/unmigrated Version: rel:R25-11#922f3ee8 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_00518@rel:R25-11#922f3ee8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0992927d2026-09-30
  • R19-11rel:R19-11#61bca1be2026-10-14
  • R20-11rel:R20-11#37ddb2832026-10-14
  • R21-11rel:R21-11#37ddb2832026-10-14
  • R22-11rel:R22-11#7317251b2026-10-14
  • R23-11rel:R23-11#0358e5832026-10-14
  • R24-11rel:R24-11#1a1843532026-10-14
  • R25-11rel:R25-11#922f3ee82026-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

함수 SupportData [SWS_CORE_00516] Upstream: RS_AP_00130

constexpr ErrorDomain::SupportDataType SupportData () const noexcept;

Return the supplementary error context data

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: f7a24bdeeedd 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

헤더 #include "ara/core/error_code.h"에 정의된 클래스 ara::core::ErrorCode의 멤버 함수 SupportData()은(는) 오류에 대한 보충 컨텍스트 데이터를 반환합니다 [SWS_CORE_00516]. 이 메서드는 인스턴스에서 동기적으로 호출되며, 매개변수가 필요하지 않고 ErrorDomain::SupportDataType 타입의 값을 반환합니다 [SWS_CORE_00516]. constexpr 및 noexcept(으)로 선언되어 있으므로 호출 시 예외가 발생하지 않음이 보장되며 컴파일 타임에 이미 평가될 수 있습니다 [SWS_CORE_00516].

동시성 및 실행 안전성과 관련하여, 이 메서드는 스레드 안전(thread-safe) 및 예외 안전(exception safe)(으)로 명시되어 있습니다 [SWS_CORE_00516]. 내부 오류 컨텍스트에 대한 읽기 접근이므로 오류 상태가 발생하지 않아, 중요하고 동시적인 실행 경로에도 이 호출이 적합합니다 [SWS_CORE_00516].

오류 처리의 다른 인터페이스와의 상호작용에서 SupportData()은(는) 매개변수 data을(를) 통해 ErrorCode의 생성자에 선택적으로 전달된 공급업체 고유 추가 데이터를 읽습니다 [SWS_CORE_00513]. operator==을(를) 사용하여 두 오류 코드를 비교할 때, 인스턴스는 오직 Value() 및 Domain()의 반환값을 기반으로 해서만 동일한 것으로 평가되며, SupportData()의 반환값은 동등성 비교에 명시적으로 사용되지 않는다는 점에 유의해야 합니다 [SWS_CORE_00571].

이 사용 참고사항은 AUTOSAR Adaptive R25-11 명세를 기반으로 자동 생성되었습니다.

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

Rückgabewert

TypBeschreibung
ErrorDomain::SupportDataTypethe supplementary error context data

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

Record
AUTOSAR/AP/record/SWS_CORE_00516
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00516@rel:R25-11#a829a5f2
Content hash
a829a5f2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00516
Status: valid/unmigrated Version: rel:R25-11#cd6d349c 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_00516@rel:R25-11#cd6d349c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#dd12519a2026-09-30
  • R19-11rel:R19-11#f353413f2026-10-14
  • R20-11rel:R20-11#0e8a30502026-10-14
  • R21-11rel:R21-11#8c3ebf4e2026-10-14
  • R22-11rel:R22-11#dbd404532026-10-14
  • R23-11rel:R23-11#c6ac50a92026-10-14
  • R24-11rel:R24-11#2949be102026-10-14
  • R25-11rel:R25-11#cd6d349c2026-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_00519] Upstream: RS_AP_00130

void ThrowAsException () const noexcept(false);

Throw this error as exception.

This function will determine the appropriate exception type for this ErrorCode and throw it. The thrown exception will contain this ErrorCode.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 3205bd108ecb 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::core::ErrorCode 클래스의 멤버 함수 ThrowAsException은(는) 발생한 오류를 C++ 예외로서 동기식으로 발생시키는 데 사용됩니다([SWS_CORE_00519]). 예외 발생에 의해 정규 제어 흐름이 중단되므로, 이 함수는 전달 매개변수를 받지 않으며 반환값이 없습니다.

구체적인 예외 타입을 결정하기 위해 메서드는 this->Domain().ThrowAsException(*this) 동작에 따라 할당된 오류 도메인으로 발생 처리를 위임합니다([SWS_CORE_00519]). 기본 클래스 ara::core::ErrorDomain의 인터페이스를 통해([SWS_CORE_00154]) 각 도메인은 [SWS_CORE_10953]의 지정에 따라 적절한 예외 타입을 결정합니다. 발생된 예외는 항상 이를 유발한 ErrorCode 인스턴스를 포함합니다. 구체적인 도메인은 이를 특정하여 구현합니다:

  • ara::core::FutureErrorDomain은(는) 전달된 오류 인스턴스와 함께 FutureException을(를) 발생시킵니다([SWS_CORE_00444]).
  • ara::core::CoreErrorDomain은(는) 인스턴스를 캡슐화하는 CoreException을(를) 발생시킵니다([SWS_CORE_05244], [SWS_CORE_10304]).

동시성 및 제약 조건과 관련하여 ThrowAsException은(는) 스레드 안전한 것으로 명시되어 있습니다([SWS_CORE_00519]). 예외 안전성은 not exception safe로 선언되어 있으며 시그니처에는 명시적으로 noexcept(false)이(가) 표시되어 있습니다([SWS_CORE_00519]). 툴체인의 주요 제한 사항은 컴파일러에서 C++ 예외가 비활성화된 경우 해당 함수가 오버로드 확인에 참여하지 않는다는 점입니다([SWS_CORE_00519]).

이 사용 지침은 Release R25-11의 AUTOSAR 사양을 기반으로 합니다.

구현자 가이드 준비 중 (복잡도 I1)

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

Rückgabewert

TypBeschreibung
None

Exceptions

Any exception of the type determined by the associated ErrorDomain as defined in [SWS_CORE_10953]

Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain. Behaves as if this->Domain().ThrowAsException(*this).

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

Record
AUTOSAR/AP/record/SWS_CORE_00519
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00519@rel:R25-11#65158799
Content hash
65158799
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00519
Status: valid/unmigrated Version: rel:R25-11#6858a44e 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_00519@rel:R25-11#6858a44e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#48e89b2d2026-09-30
  • R19-11rel:R19-11#678eb5a72026-10-14
  • R20-11rel:R20-11#afb7b5682026-10-14
  • R21-11rel:R21-11#afb7b5682026-10-14
  • R22-11rel:R22-11#f01dd35b2026-10-14
  • R23-11rel:R23-11#7edbb7432026-10-14
  • R24-11rel:R24-11#32ee8f072026-10-14
  • R25-11rel:R25-11#6858a44e2026-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

함수 Value [SWS_CORE_00514] Upstream: RS_AP_00130

constexpr ErrorDomain::CodeType Value () const noexcept;

Return the raw error code value

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

Rückgabewert

TypBeschreibung
ErrorDomain::CodeTypethe raw error code value

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

Record
AUTOSAR/AP/record/SWS_CORE_00514
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00514@rel:R25-11#1c10d7f6
Content hash
1c10d7f6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00514
Status: valid/unmigrated Version: rel:R25-11#7468c4e4 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_00514@rel:R25-11#7468c4e4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d6a896c22026-09-30
  • R19-11rel:R19-11#712626e82026-10-14
  • R20-11rel:R20-11#e25634362026-10-14
  • R21-11rel:R21-11#e25634362026-10-14
  • R22-11rel:R22-11#24268b5e2026-10-14
  • R23-11rel:R23-11#cbbb65bf2026-10-14
  • R24-11rel:R24-11#e4046a7d2026-10-14
  • R25-11rel:R25-11#7468c4e42026-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