class final
#include <dbar.hpp>
v_1_0_0::StreamParseException Reports a read error during parsing a binary stream.
Constructors, destructors, conversion operators
- StreamParseException(const unsigned byte_pos, const unsigned block, const unsigned block_byte_pos)
- Constructor with default message.
- StreamParseException(const unsigned byte_pos, const unsigned block, const unsigned block_byte_pos, const std::string& what_arg)
- Constructor.
Public functions
- auto block() const -> unsigned noexcept
- The 1-based block number of the block in which the exception occurred.
- auto block_byte_position() const -> unsigned noexcept
- Last 1-based byte position relative to the start of the current block before the exception occurred.
- auto byte_position() const -> unsigned noexcept
- Last 1-based global byte position before the exception occurred.
Function documentation
arcstk:: v_1_0_0:: StreamParseException:: StreamParseException(const unsigned byte_pos,
const unsigned block,
const unsigned block_byte_pos)
Constructor with default message.
Parameters | |
---|---|
byte_pos in | Last 1-based global byte pos before exception |
block in | 1-based block number |
block_byte_pos in | Last 1-based block byte pos before exception |
arcstk:: v_1_0_0:: StreamParseException:: StreamParseException(const unsigned byte_pos,
const unsigned block,
const unsigned block_byte_pos,
const std::string& what_arg)
Constructor.
Parameters | |
---|---|
byte_pos in | Last 1-based global byte pos before exception |
block in | 1-based block number |
block_byte_pos in | Last 1-based block byte pos before exception |
what_arg in | Error message |
unsigned arcstk:: v_1_0_0:: StreamParseException:: block() const noexcept
The 1-based block number of the block in which the exception occurred.
Returns | The 1-based block number of the block |
---|
unsigned arcstk:: v_1_0_0:: StreamParseException:: block_byte_position() const noexcept
Last 1-based byte position relative to the start of the current block before the exception occurred.
Returns | Last 1-based block byte position read before the exception |
---|
unsigned arcstk:: v_1_0_0:: StreamParseException:: byte_position() const noexcept
Last 1-based global byte position before the exception occurred.
Returns | Last 1-based global byte position before the exception occurred |
---|