Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline::PersistenceError Struct Reference

Structured persistence failure. More...

#include <schema_json.hpp>

Public Member Functions

 PersistenceError ()=default
 Constructs an InvalidJson error with no source location.
 PersistenceError (PersistenceErrorCode error_code, std::size_t offset=0, std::uint64_t observed=0, std::uint64_t maximum=0, std::string error_path={}, std::optional< ModelError > rejected_model={})
 Constructs a structured persistence error from stage-specific details.

Public Attributes

PersistenceErrorCode code = PersistenceErrorCode::InvalidJson
 Failure category.
std::size_t byte_offset = 0
 Source byte offset, when available.
std::uint64_t actual = 0
 Observed size or count for a quota failure.
std::uint64_t limit = 0
 Configured ceiling for a quota failure.
std::string path
 JSON Pointer-like path to the rejected value.
std::optional< ModelError > model_error
 Underlying ModelRejected detail.

Detailed Description

Structured persistence failure.

byte_offset locates syntax/encoding failures in the original input. actual and limit describe quota failures. path is a JSON Pointer-like model path, and model_error carries the underlying model invariant rejection when code is ModelRejected. Fields not applicable to a code remain zero or empty.

Constructor & Destructor Documentation

◆ PersistenceError() [1/2]

pulp::timeline::PersistenceError::PersistenceError ( )
default

Constructs an InvalidJson error with no source location.

◆ PersistenceError() [2/2]

pulp::timeline::PersistenceError::PersistenceError ( PersistenceErrorCode error_code,
std::size_t offset = 0,
std::uint64_t observed = 0,
std::uint64_t maximum = 0,
std::string error_path = {},
std::optional< ModelError > rejected_model = {} )
inlineexplicit

Constructs a structured persistence error from stage-specific details.

Parameters
error_codeFailure category.
offsetSource byte offset, when applicable.
observedObserved size or count for a quota failure.
maximumConfigured ceiling for a quota failure.
error_pathJSON Pointer-like diagnostic path.
rejected_modelUnderlying model failure for ModelRejected.

Member Data Documentation

◆ actual

std::uint64_t pulp::timeline::PersistenceError::actual = 0

Observed size or count for a quota failure.

◆ byte_offset

std::size_t pulp::timeline::PersistenceError::byte_offset = 0

Source byte offset, when available.

◆ code

PersistenceErrorCode pulp::timeline::PersistenceError::code = PersistenceErrorCode::InvalidJson

Failure category.

◆ limit

std::uint64_t pulp::timeline::PersistenceError::limit = 0

Configured ceiling for a quota failure.

◆ model_error

std::optional<ModelError> pulp::timeline::PersistenceError::model_error

Underlying ModelRejected detail.

◆ path

std::string pulp::timeline::PersistenceError::path

JSON Pointer-like path to the rejected value.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline/include/pulp/timeline/schema_json.hpp