StormByte 3.0.0
C++26 foundation of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Safe::OutOfBoundsError Class Reference

An index or range is out of bounds. More...

#include <StormByte/safe/exception.hxx>

Inheritance diagram for StormByte::Safe::OutOfBoundsError:
Collaboration diagram for StormByte::Safe::OutOfBoundsError:

Public Member Functions

 OutOfBoundsError (const Size &index)
 Report index.
 OutOfBoundsError ()
 Report an out-of-range access that has no numeric bound.
 OutOfBoundsError (const OutOfBoundsError &other)
 Copy constructor.
 OutOfBoundsError (OutOfBoundsError &&other) noexcept
 Move constructor.
 ~OutOfBoundsError () noexcept override
 Destructor.
OutOfBoundsError & operator= (const OutOfBoundsError &other)
 Copy assignment.
OutOfBoundsError & operator= (OutOfBoundsError &&other) noexcept
 Move assignment.
Public Member Functions inherited from StormByte::Safe::Exception
 Exception (std::string_view message)
 Copy a body into StormByte.Safe: message.
 Exception (const Exception &other)
 Copy constructor.
 Exception (Exception &&other) noexcept
 Move constructor.
 ~Exception () noexcept override
 Destructor.
Exception & operator= (const Exception &other)
 Copy assignment.
Exception & operator= (Exception &&other) noexcept
 Move assignment.
template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (std::string_view pattern, Args &&... args)
 Replace literal {} under the Safe path.
Public Member Functions inherited from StormByte::Exception
 Exception (std::string_view message)
 Copies text into StormByte: message.
 Exception (const Exception &other)
 Copy constructor.
 Exception (Exception &&other) noexcept
 Move constructor.
Exception & operator= (const Exception &other)
 Copy assignment.
Exception & operator= (Exception &&other) noexcept
 Move assignment.
virtual const char * what () const noexcept
 Message pointer.

Additional Inherited Members

Protected Member Functions inherited from StormByte::Safe::Exception
 Exception () noexcept
 Construct without allocating message storage.
Protected Member Functions inherited from StormByte::Exception
 Exception () noexcept
 Construct without allocating message storage.
 Exception (Path path, std::string_view message)
 Stores StormByte.path: message, or StormByte: message when path is empty.
 Exception (Path path, Safe::String &&message)
 Stores StormByte.path: message, taking the body.
template<typename... Args>
requires (sizeof...(Args) >= 1)
 Exception (Path path, std::string_view pattern, Args &&... args)
 Stores StormByte.path: message after replacing literal {}.

Detailed Description

An index or range is out of bounds.

The text is fixed. A Size is written into it. No size means there is no numeric bound, as with a missing map key. The path Safe is applied by Exception.

Constructor & Destructor Documentation

◆ OutOfBoundsError() [1/4]

StormByte::Safe::OutOfBoundsError::OutOfBoundsError ( const Size & index)
explicit

Report index.

Text is index <index> is out of range.

Parameters
indexBound that was outside the range.

◆ OutOfBoundsError() [2/4]

StormByte::Safe::OutOfBoundsError::OutOfBoundsError ( )

Report an out-of-range access that has no numeric bound.

Text is index is out of range.

◆ OutOfBoundsError() [3/4]

StormByte::Safe::OutOfBoundsError::OutOfBoundsError ( const OutOfBoundsError & other)

Copy constructor.

Defined in the Base DLL.

Parameters
otherException to copy.

◆ OutOfBoundsError() [4/4]

StormByte::Safe::OutOfBoundsError::OutOfBoundsError ( OutOfBoundsError && other)
noexcept

Move constructor.

Defined in the Base DLL.

Parameters
otherException to take.

◆ ~OutOfBoundsError()

StormByte::Safe::OutOfBoundsError::~OutOfBoundsError ( )
overridenoexcept

Destructor.

Defined in the Base DLL so catch matches across modules.

Member Function Documentation

◆ operator=() [1/2]

OutOfBoundsError & StormByte::Safe::OutOfBoundsError::operator= ( const OutOfBoundsError & other)

Copy assignment.

Defined in the Base DLL.

Parameters
otherException to copy.
Returns
This exception.

◆ operator=() [2/2]

OutOfBoundsError & StormByte::Safe::OutOfBoundsError::operator= ( OutOfBoundsError && other)
noexcept

Move assignment.

Defined in the Base DLL.

Parameters
otherException to take.
Returns
This exception.

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