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

Memory allocation failed under Safe. More...

#include <StormByte/safe/exception.hxx>

Inheritance diagram for StormByte::Safe::AllocationError:
Collaboration diagram for StormByte::Safe::AllocationError:

Public Member Functions

 AllocationError () noexcept
 Construct an allocation failure.
 AllocationError (const AllocationError &other) noexcept
 Copy constructor.
 AllocationError (AllocationError &&other) noexcept
 Move constructor.
 ~AllocationError () noexcept override
 Destructor.
AllocationError & operator= (const AllocationError &other) noexcept
 Copy assignment.
AllocationError & operator= (AllocationError &&other) noexcept
 Move assignment.
const char * what () const noexcept override
 Return the static message.
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.

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

Memory allocation failed under Safe.

Constructing this exception does not allocate. what() returns static text. The path is part of that literal because this leaf does not fill the owned message.

Constructor & Destructor Documentation

◆ AllocationError() [1/3]

StormByte::Safe::AllocationError::AllocationError ( )
noexcept

Construct an allocation failure.

No message storage.

◆ AllocationError() [2/3]

StormByte::Safe::AllocationError::AllocationError ( const AllocationError & other)
noexcept

Copy constructor.

Defined in the Base DLL.

Parameters
otherException to copy.

◆ AllocationError() [3/3]

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

Move constructor.

Defined in the Base DLL.

Parameters
otherException to take.

◆ ~AllocationError()

StormByte::Safe::AllocationError::~AllocationError ( )
overridenoexcept

Destructor.

Defined in the Base DLL so catch matches across modules.

Member Function Documentation

◆ operator=() [1/2]

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

Move assignment.

Defined in the Base DLL.

Parameters
otherException to take.
Returns
This exception.

◆ operator=() [2/2]

AllocationError & StormByte::Safe::AllocationError::operator= ( const AllocationError & other)
noexcept

Copy assignment.

Defined in the Base DLL.

Parameters
otherException to copy.
Returns
This exception.

◆ what()

const char * StormByte::Safe::AllocationError::what ( ) const
overridevirtualnoexcept

Return the static message.

Returns
StormByte.Safe: Memory allocation failed.

Reimplemented from StormByte::Exception.


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