Skip to main content

NeatError Class

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

Declaration

class simaai::neat::NeatError { ... }

Included Headers

#include <NeatError.h>

Base class

classstd::runtime_error

Public Constructors Index

NeatError (std::string msg)

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

NeatError (std::string msg, GraphReport report)

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

Public Member Functions Index

const GraphReport &report () const

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

Private Member Attributes Index

GraphReportreport_

Description

Framework exception type carrying a structured GraphReport.

Catch NeatError (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 = graph.build(input);
 } catch (const sima::NeatError& 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

GraphReport for the structured payload

See Also

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

Definition at line 43 of file NeatError.h.

Public Constructors

NeatError()

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

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

Definition at line 46 of file NeatError.h.

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

NeatError()

simaai::neat::NeatError::NeatError (std::string msg, GraphReport report)
inline

Construct from a message and an attached structured report.

Definition at line 48 of file NeatError.h.

48 NeatError(std::string msg, GraphReport report)
49 : std::runtime_error(std::move(msg)), report_(std::move(report)) {}

Public Member Functions

report()

const GraphReport & simaai::neat::NeatError::report ()
inline

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

Definition at line 51 of file NeatError.h.

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

Private Member Attributes

report_

GraphReport simaai::neat::NeatError::report_

Definition at line 56 of file NeatError.h.

56 GraphReport report_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.