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

An exception that is thrown, if a provided argument is not valid. More...

#include <exceptions.hpp>

Inherits LiteFX::Exception.

Public Member Functions

 InvalidArgumentException (std::string_view argument)
 Initializes a new exception.
 
 InvalidArgumentException (std::string_view argument, std::string_view message)
 Initializes a new exception.
 
template<typename ... TArgs>
 InvalidArgumentException (std::string_view argument, std::format_string< TArgs... > format, TArgs &&... args)
 Initializes a new exception.
 
 InvalidArgumentException (const InvalidArgumentException &)=default
 
 InvalidArgumentException (InvalidArgumentException &&) noexcept=default
 
 ~InvalidArgumentException () noexcept override=default
 
InvalidArgumentExceptionoperator= (const InvalidArgumentException &)=default
 
InvalidArgumentExceptionoperator= (InvalidArgumentException &&) noexcept=default
 
const std::string & argument () const noexcept
 Gets the name of the argument that was invalid.
 
- 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 valid.

Constructor & Destructor Documentation

◆ InvalidArgumentException() [1/5]

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

Initializes a new exception.

Parameters
argumentThe name of the argument that was invalid.

◆ InvalidArgumentException() [2/5]

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

Initializes a new exception.

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

◆ InvalidArgumentException() [3/5]

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

Initializes a new exception.

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

◆ InvalidArgumentException() [4/5]

LiteFX::InvalidArgumentException::InvalidArgumentException ( const InvalidArgumentException & )
default

◆ InvalidArgumentException() [5/5]

LiteFX::InvalidArgumentException::InvalidArgumentException ( InvalidArgumentException && )
defaultnoexcept

◆ ~InvalidArgumentException()

LiteFX::InvalidArgumentException::~InvalidArgumentException ( )
overridedefaultnoexcept

Member Function Documentation

◆ argument()

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

Gets the name of the argument that was invalid.

Returns
The name of the invalid argument.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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