Skip to main content

SessionError Class

Framework exception type carrying a structured SessionReport. More...

Declaration

class simaai::neat::SessionError { ... }

Included Headers

#include <SessionError.h>

Base class

classstd::runtime_error

Public Constructors Index

SessionError (std::string msg)

Construct from a message only (no structured report — used for early/internal failures). More...

SessionError (std::string msg, SessionReport report)

Construct from a message and an attached structured report. More...

Public Member Functions Index

const SessionReport &report () const

Returns the structured SessionReport (machine-readable error details for triage). More...

Private Member Attributes Index

SessionReportreport_

Description

Framework exception type carrying a structured SessionReport.

Catch SessionError (or std::runtime_error) from any framework call that can fail. Use the report() accessor to get machine-readable error details for triage.

 try {
  auto run = sess.build(input);
 } catch (const sima::SessionError& e) {
  std::cerr << e.what() << "\n";
  auto& r = e.report();
  std::cerr << "error_code: " << r.error_code << "\n"
  << "repro: " << r.repro_gst_launch << "\n";
 }
See Also

SessionReport for the structured payload

See Also

"Validation API" (§29 of the design deep dive)

Definition at line 43 of file SessionError.h.

Public Constructors

SessionError()

simaai::neat::SessionError::SessionError (std::string msg)
inline explicit

Construct from a message only (no structured report — used for early/internal failures).

Definition at line 46 of file SessionError.h.

46 explicit SessionError(std::string msg) : std::runtime_error(std::move(msg)), report_{} {}

SessionError()

simaai::neat::SessionError::SessionError (std::string msg, SessionReport report)
inline

Construct from a message and an attached structured report.

Definition at line 48 of file SessionError.h.

49 : std::runtime_error(std::move(msg)), report_(std::move(report)) {}

Public Member Functions

report()

const SessionReport & simaai::neat::SessionError::report ()
inline

Returns the structured SessionReport (machine-readable error details for triage).

Definition at line 51 of file SessionError.h.

51 const SessionReport& report() const {
52 return report_;
53 }

Private Member Attributes

report_

SessionReport simaai::neat::SessionError::report_

Definition at line 56 of file SessionError.h.

56 SessionReport report_;

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.