LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::ArgumentOutOfRangeException Class Reference

An exception that is thrown, if a provided argument is not within the expected range. More...

#include <exceptions.hpp>

Inherits LiteFX::Exception.

Public Member Functions

 ArgumentOutOfRangeException (std::string_view argument)
 Initializes a new exception.
 
 ArgumentOutOfRangeException (std::string_view argument, std::string_view message)
 Initializes a new exception.
 
template<typename ... TArgs>
 ArgumentOutOfRangeException (std::string_view argument, std::format_string< TArgs... > format, TArgs &&... args)
 Initializes a new exception.
 
template<typename T , typename ... TArgs>
 ArgumentOutOfRangeException (std::string_view argument, std::pair< T, T > validRange, T value, std::format_string< TArgs... > format, TArgs &&... args)
 Initializes a new exception.
 
 ArgumentOutOfRangeException (const ArgumentOutOfRangeException &)=default
 
 ArgumentOutOfRangeException (ArgumentOutOfRangeException &&) noexcept=default
 
 ~ArgumentOutOfRangeException () noexcept override=default
 
ArgumentOutOfRangeExceptionoperator= (const ArgumentOutOfRangeException &)=default
 
ArgumentOutOfRangeExceptionoperator= (ArgumentOutOfRangeException &&) noexcept=default
 
const std::string & argument () const noexcept
 Gets the name of the argument that was out of range.
 
- Public Member Functions inherited from LiteFX::Exception
 Exception (const Exception &)=default
 
 Exception (Exception &&) noexcept=default
 
 ~Exception () noexcept override=default
 
Exceptionoperator= (const Exception &)=default
 
Exceptionoperator= (Exception &&) noexcept=default
 
const std::source_location & location () const noexcept
 Gets the source location that identifies where the exception has been thrown.
 
const std::stacktrace & trace () const noexcept
 Gets the stack trace leading to the exception.
 

Additional Inherited Members

- Protected Member Functions inherited from LiteFX::Exception
 Exception (const std::string &message, const std::source_location &location, std::stacktrace trace)
 Initializes the exception.
 

Detailed Description

An exception that is thrown, if a provided argument is not within the expected range.

Constructor & Destructor Documentation

◆ ArgumentOutOfRangeException() [1/6]

LiteFX::ArgumentOutOfRangeException::ArgumentOutOfRangeException ( std::string_view argument)
inlineexplicit

Initializes a new exception.

Parameters
argumentThe name of the argument that was out of range.

◆ ArgumentOutOfRangeException() [2/6]

LiteFX::ArgumentOutOfRangeException::ArgumentOutOfRangeException ( std::string_view argument,
std::string_view message )
inlineexplicit

Initializes a new exception.

Parameters
argumentThe name of the argument that was out of range.
messageThe error message.

◆ ArgumentOutOfRangeException() [3/6]

template<typename ... TArgs>
LiteFX::ArgumentOutOfRangeException::ArgumentOutOfRangeException ( std::string_view argument,
std::format_string< TArgs... > format,
TArgs &&... args )
inlineexplicit

Initializes a new exception.

Parameters
argumentThe name of the argument that was out of range.
formatThe format string for the error message.
argsThe arguments passed to the error message format string.

◆ ArgumentOutOfRangeException() [4/6]

template<typename T , typename ... TArgs>
LiteFX::ArgumentOutOfRangeException::ArgumentOutOfRangeException ( std::string_view argument,
std::pair< T, T > validRange,
T value,
std::format_string< TArgs... > format,
TArgs &&... args )
inlineexplicit

Initializes a new exception.

Template Parameters
TThe type of the argument that was out of range.
Parameters
argumentThe name of the argument that was out of range.
validRangeThe lower bound and upper bound of the valid range.
valueThe actual value of provided to the argument.
formatThe format string for the error message.
argsThe arguments passed to the error message format string.

◆ ArgumentOutOfRangeException() [5/6]

LiteFX::ArgumentOutOfRangeException::ArgumentOutOfRangeException ( const ArgumentOutOfRangeException & )
default

◆ ArgumentOutOfRangeException() [6/6]

LiteFX::ArgumentOutOfRangeException::ArgumentOutOfRangeException ( ArgumentOutOfRangeException && )
defaultnoexcept

◆ ~ArgumentOutOfRangeException()

LiteFX::ArgumentOutOfRangeException::~ArgumentOutOfRangeException ( )
overridedefaultnoexcept

Member Function Documentation

◆ argument()

const std::string & LiteFX::ArgumentOutOfRangeException::argument ( ) const
inlinenoexcept

Gets the name of the argument that was out of range.

Returns
The name of the invalid out of range.

◆ operator=() [1/2]

ArgumentOutOfRangeException & LiteFX::ArgumentOutOfRangeException::operator= ( ArgumentOutOfRangeException && )
defaultnoexcept

◆ operator=() [2/2]

ArgumentOutOfRangeException & LiteFX::ArgumentOutOfRangeException::operator= ( const ArgumentOutOfRangeException & )
default