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

The base class for exceptions thrown by the SDK. More...

#include <exceptions.hpp>

Inherits std::runtime_error.

Inherited by LiteFX::ArgumentNotInitializedException, LiteFX::ArgumentOutOfRangeException, LiteFX::InvalidArgumentException, and LiteFX::RuntimeException.

Public Member Functions

 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.
 

Protected Member Functions

 Exception (const std::string &message, const std::source_location &location, std::stacktrace trace)
 Initializes the exception.
 

Detailed Description

The base class for exceptions thrown by the SDK.

Constructor & Destructor Documentation

◆ Exception() [1/3]

LiteFX::Exception::Exception ( const std::string & message,
const std::source_location & location,
std::stacktrace trace )
inlineexplicitprotected

Initializes the exception.

Parameters
messageThe error message.
locationThe source location of the error.
traceThe stack trace leading to the error.

◆ Exception() [2/3]

LiteFX::Exception::Exception ( const Exception & )
default

◆ Exception() [3/3]

LiteFX::Exception::Exception ( Exception && )
defaultnoexcept

◆ ~Exception()

LiteFX::Exception::~Exception ( )
overridedefaultnoexcept

Member Function Documentation

◆ location()

const std::source_location & LiteFX::Exception::location ( ) const
inlinenoexcept

Gets the source location that identifies where the exception has been thrown.

Returns
The source location of the exception.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ trace()

const std::stacktrace & LiteFX::Exception::trace ( ) const
inlinenoexcept

Gets the stack trace leading to the exception.

Returns
The stack trace of the exception.