CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::Exception Class Reference

#include <CeresEngine/Foundation/Exception.hpp>

Inheritance diagram for CeresEngine::Exception:
CeresEngine::Constraint::ConstraintException CeresEngine::FileNotFoundException CeresEngine::GraphException CeresEngine::IOException CeresEngine::InternalErrorException CeresEngine::InvalidArgumentException CeresEngine::InvalidParametersException CeresEngine::InvalidStateException CeresEngine::NotImplementedException CeresEngine::RuntimeError

Public Member Functions

 Exception (const char *typeName, const String &description="", const SourceLocation &sourceLocation=SourceLocation::current())
 
template<typename S , typename... Args>
 Exception (const char *typeName, const S &formatString, Args &&... args)
 
 Exception (const Exception &other)=default
 
Exceptionoperator= (const Exception &other)=default
 
 Exception (Exception &&other) noexcept=default
 
Exceptionoperator= (Exception &&other) noexcept=default
 
 ~Exception () noexcept override=default
 
virtual const StringgetFullDescription () const
 Returns a string with the full description of the exception.
 
virtual StringView getSource () const noexcept
 Gets the source function that threw the exception.
 
virtual StringView getFile () const noexcept
 Gets the source file name in which the exception was thrown.
 
virtual UInt32 getLine () const noexcept
 Gets line number on which the exception was thrown.
 
virtual StringView getDescription () const noexcept
 Gets a short description about the exception.
 
const charwhat () const noexcept override
 Overriden std::exception::what. Returns the same value as getFullDescription().
 

Private Attributes

StringView mTypeName
 
String mDescription
 
SourceLocation mSourceLocation
 
String mFullDescription
 

Constructor & Destructor Documentation

◆ Exception() [1/4]

CeresEngine::Exception::Exception ( const char typeName,
const String description = "",
const SourceLocation sourceLocation = SourceLocation::current() 
)
inlineexplicit

◆ Exception() [2/4]

template<typename S , typename... Args>
CeresEngine::Exception::Exception ( const char typeName,
const S formatString,
Args &&...  args 
)
inlineexplicit

◆ Exception() [3/4]

CeresEngine::Exception::Exception ( const Exception other)
default

◆ Exception() [4/4]

CeresEngine::Exception::Exception ( Exception &&  other)
defaultnoexcept

◆ ~Exception()

CeresEngine::Exception::~Exception ( )
overridedefaultnoexcept

Member Function Documentation

◆ getDescription()

virtual StringView CeresEngine::Exception::getDescription ( ) const
inlinevirtualnoexcept

Gets a short description about the exception.

◆ getFile()

virtual StringView CeresEngine::Exception::getFile ( ) const
inlinevirtualnoexcept

Gets the source file name in which the exception was thrown.

◆ getFullDescription()

virtual const String & CeresEngine::Exception::getFullDescription ( ) const
inlinevirtual

Returns a string with the full description of the exception.

Note
The description contains the error number, the description supplied by the thrower, what routine threw the exception, and will also supply extra platform-specific information where applicable.

◆ getLine()

virtual UInt32 CeresEngine::Exception::getLine ( ) const
inlinevirtualnoexcept

Gets line number on which the exception was thrown.

◆ getSource()

virtual StringView CeresEngine::Exception::getSource ( ) const
inlinevirtualnoexcept

Gets the source function that threw the exception.

◆ operator=() [1/2]

Exception & CeresEngine::Exception::operator= ( const Exception other)
default

◆ operator=() [2/2]

Exception & CeresEngine::Exception::operator= ( Exception &&  other)
defaultnoexcept

◆ what()

const char * CeresEngine::Exception::what ( ) const
inlineoverridenoexcept

Overriden std::exception::what. Returns the same value as getFullDescription().

Member Data Documentation

◆ mDescription

String CeresEngine::Exception::mDescription
private

◆ mFullDescription

String CeresEngine::Exception::mFullDescription
mutableprivate

◆ mSourceLocation

SourceLocation CeresEngine::Exception::mSourceLocation
private

◆ mTypeName

StringView CeresEngine::Exception::mTypeName
private

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