DEENESPTFRRUARHIKOZHNL

class ara::tsync::TsyncException

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

class TsyncException :             public ara::core::Exception {...};

Defines a class for exceptions to be thrown by the Time Synchronization.

Header-Datei#include "ara/tsync/tsync_error_domain.h"
Forwarding-Header#include "ara/tsync/tsync_fwd.h"
Scopenamespace ara::tsync
Basisklasse(n)ara::core::Exception

User GuideAI-GENERATED

Serves to report and encapsulate Time Synchronization errors in the form of an exception with an associated error code.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 02ba32fb22cc Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves to report and encapsulate Time Synchronization errors in the form of an exception with an associated error code.

The exception class ara::tsync::TsyncException is used to encapsulate and forward errors that occur during Time Synchronization within the Adaptive Platform. It derives from ara::core::Exception and obligatorily takes a specific ara::core::ErrorCode upon its construction that describes the cause of the error [SWS_TS_00903]. The constructor is declared as noexcept, ensuring that instantiation of the exception is guaranteed to be exception-safe and thread-safe [SWS_TS_00903]. Applications are expected to catch the exception in their error handling paths to evaluate the contained error code specifically. Question (open)

Context

The class ara::tsync::TsyncException represents the dedicated exception class for the Time Synchronization (tsync) functional area within the AUTOSAR Adaptive Platform. According to the specification, it is declared in the header ara/tsync/tsync_error_domain.h and serves as the central type to represent exceptions triggered by Time Synchronization [SWS_TS_00903]. By publicly deriving from the base class ara::core::Exception, it integrates seamlessly into the platform-wide error handling architecture.

In the system architecture, ara::tsync::TsyncException takes on the role of an information carrier between the implementation components of the Time Synchronization service and the application modules. If a severe error occurs during synchronization, it is not discarded in isolation, but reported in the form of a standardized exception. The class works closely with ara::core::ErrorCode, which encodes and encapsulates the specific cause of the error [SWS_TS_00903].

tsync Time Synchronization (ara::tsync) texc ara::tsync::TsyncException tsync->texc wirft errcode ara::core::ErrorCode errcode->texc Parameter errorCode base ara::core::Exception base->texc Basisklasse

Context diagram: Classification of ara::tsync::TsyncException in interaction with Time Synchronization, ara::core::ErrorCode, and ara::core::Exception. Sources: [SWS_TS_00903]

Lifecycle

The lifecycle of an instance of ara::tsync::TsyncException begins with its explicit instantiation. The specification provides a constructor for this purpose that accepts exactly one error code of type ara::core::ErrorCode: explicit TsyncException(ara::core::ErrorCode errorCode) noexcept [SWS_TS_00903]. The declaration as explicit prevents error codes from being converted into exception objects implicitly and unintentionally.

AUTOSAR formulates strict assurances for object creation: construction is explicitly specified as exception-safe (exception safe) and thread-safe (thread-safe) [SWS_TS_00903]. The keyword noexcept guarantees that the constructor itself throws no further exception under any circumstances [SWS_TS_00903]. This is essential, as exception creation typically takes place in the error handling path and a failure at this point would lead to an uncontrolled system state.

After creation, the object is subject to standard C++ exception semantics: it is transported along the call stack until caught by a corresponding handler. Upon leaving the catch block, the lifetime of the exception instance ends and the resources are released deterministically.

Usage Path

The typical sequence when using ara::tsync::TsyncException is divided into error identification, object creation, and application-side catching:

  • Error identification: Time Synchronization detects a deviation or an error state at runtime and generates a matching ara::core::ErrorCode [SWS_TS_00903].
  • Exception creation and throwing: Using the constructor, an ara::tsync::TsyncException object is instantiated with the determined error code and thrown [SWS_TS_00903].
  • Error catching: The calling component catches the exception in a structured exception handling block.

Developers are expected to handle the exception in their applications either specifically as const ara::tsync::TsyncException& or catch it polymorphically via the base class const ara::core::Exception& [SWS_TS_00903]. Question Q-0c8129359ef114e8 (open) Access to the type definition requires including the header ara/tsync/tsync_error_domain.h [SWS_TS_00903].

Error Scenarios

As an exception class, ara::tsync::TsyncException serves to explicitly represent error scenarios. The central component here is the encapsulated ara::core::ErrorCode, which provides detailed information about the specific error reason within the error domain [SWS_TS_00903].

A key characteristic is the absence of a parameterless default constructor. This ensures that no exception instance can exist without an associated error code [SWS_TS_00903]. The noexcept guarantee of the constructor further ensures that the encapsulation and signaling of the error is not superseded by secondary exception errors [SWS_TS_00903].

This guide was generated by an AI based on the AUTOSAR specification R25-11.

UML class diagram

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

G nara__tsync__TsyncException184 TsyncException + TsyncException() nara__core__Exception792 Exception nara__tsync__TsyncException184->nara__core__Exception792 nstd__exception10 std::exception nara__core__Exception792->nstd__exception10

Constructors and destructor

Constructs a new TsyncException object containing an error code.

explicit TsyncException (ara::core::ErrorCode errorCode) noexcept;

Method documentation

function TsyncException [SWS_TS_00903] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130

explicit TsyncException (ara::core::ErrorCode errorCode) noexcept;

Constructs a new TsyncException object containing an error code.

Header-Datei#include "ara/tsync/tsync_error_domain.h"
Scopeclass ara::tsync::TsyncException
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
errorCodeThe error code.

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

Record
AUTOSAR/AP/record/SWS_TS_00903
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_TS_00903@rel:R25-11#f5877bab
Content hash
f5877bab
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_TimeSynchronization.pdf#nameddest=SWS_TS_00903
Status: valid/unmigrated Version: rel:R25-11#7c8b669e Versionshistorie & Revisions (1 transition, 4 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_TS_00903@rel:R25-11#7c8b669e
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#f5877bab2026-09-30
  • R23-11rel:R23-11#9b018b632026-10-14
  • R24-11rel:R24-11#7c8b669e2026-10-14
  • R25-11rel:R25-11#7c8b669e2026-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