spudplate
Template scaffolding compiler for spudlang .spud files
Loading...
Searching...
No Matches
spudplate::SpudpackError Class Reference

Raised on any encode or decode failure. More...

#include <spudpack.h>

Inheritance diagram for spudplate::SpudpackError:

Public Member Functions

 SpudpackError (std::string message, std::optional< std::size_t > offset=std::nullopt)
 Construct with a message and an optional decode offset.
 
std::optional< std::size_t > offset () const noexcept
 Byte offset where decoding failed, if known.
 

Detailed Description

Raised on any encode or decode failure.

offset() carries the byte offset at which decoding gave up when the failure was decoder-side; encoder-side failures leave it empty.