Infinity Engine v0.6.20
C++ API Documentation
Loading...
Searching...
No Matches
Infinity::Engine::BaseException Class Reference

Base exception class for all Infinity Engine exceptions. More...

#include <BaseException.hpp>

Inheritance diagram for Infinity::Engine::BaseException:
[legend]
Collaboration diagram for Infinity::Engine::BaseException:
[legend]

Public Member Functions

 BaseException (const char *message)
 Constructs a BaseException with a C-string message.
 
 BaseException (const std::string &message)
 Constructs a BaseException with a std::string message.
 
virtual const char * what () const noexcept override
 Returns the exception message.
 

Protected Attributes

std::string _message
 The stored error message.
 

Detailed Description

Base exception class for all Infinity Engine exceptions.

BaseException serves as the foundation for the Infinity Engine's exception hierarchy, extending std::exception to provide consistent error handling throughout the SDK. All custom exceptions in the Infinity Engine should inherit from this class to maintain a unified exception handling interface.

Constructor & Destructor Documentation

◆ BaseException() [1/2]

Infinity::Engine::BaseException::BaseException ( const char *  message)
explicit

Constructs a BaseException with a C-string message.

Parameters
messageThe error message describing the exception.

◆ BaseException() [2/2]

Infinity::Engine::BaseException::BaseException ( const std::string &  message)
explicit

Constructs a BaseException with a std::string message.

Parameters
messageThe error message describing the exception.

Member Function Documentation

◆ what()

virtual const char * Infinity::Engine::BaseException::what ( ) const
overridevirtualnoexcept

Returns the exception message.

Returns
A C-string containing the error message.

Member Data Documentation

◆ _message

std::string Infinity::Engine::BaseException::_message
protected

The stored error message.