arcstk::v_1_0_0::StreamReadException class final

Reports a read error during parsing a binary stream.

Constructors, destructors, conversion operators

StreamReadException(const uint32_t byte_pos, const uint32_t block, const uint32_t block_byte_pos, const char* what_arg)
Constructor.
StreamReadException(const uint32_t byte_pos, const uint32_t block, const uint32_t block_byte_pos, const std::string& what_arg)
Constructor.

Public functions

auto block() const -> uint32_t noexcept
The 1-based block number of the block in which the exception occurred.
auto block_byte_position() const -> uint32_t noexcept
Last 1-based byte position relative to the start of the current block before the exception occurred.
auto byte_position() const -> uint32_t noexcept
Last 1-based global byte position before the exception occurred.

Function documentation

arcstk::v_1_0_0::StreamReadException::StreamReadException(const uint32_t byte_pos, const uint32_t block, const uint32_t block_byte_pos, const char* what_arg)

Constructor.

Parameters
byte_pos in Last 1-based global byte pos read before exception
block in 1-based block number
block_byte_pos in Last 1-based block byte pos read before exception
what_arg in Error message

arcstk::v_1_0_0::StreamReadException::StreamReadException(const uint32_t byte_pos, const uint32_t block, const uint32_t block_byte_pos, const std::string& what_arg)

Constructor.

Parameters
byte_pos in Last 1-based global byte pos read before exception
block in 1-based block number
block_byte_pos in Last 1-based block byte pos read before exception
what_arg in Error message

uint32_t arcstk::v_1_0_0::StreamReadException::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

uint32_t arcstk::v_1_0_0::StreamReadException::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

uint32_t arcstk::v_1_0_0::StreamReadException::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