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

Exception type for errors that occur within ProceduralSystem operations. More...

#include <SystemException.hpp>

Inheritance diagram for Infinity::Procedural::SystemException:
[legend]
Collaboration diagram for Infinity::Procedural::SystemException:
[legend]

Public Member Functions

 SystemException (const std::string &message, const ProceduralSystem *system)
 Constructs a SystemException with a message and system reference.
 
const ProceduralSystemgetSystem () const noexcept
 Retrieves the system that caused the exception.
 
- Public Member Functions inherited from Infinity::Engine::BaseException
 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

const ProceduralSystem_system
 The system that caused the exception.
 
- Protected Attributes inherited from Infinity::Engine::BaseException
std::string _message
 The stored error message.
 

Detailed Description

Exception type for errors that occur within ProceduralSystem operations.

SystemException extends BaseException to provide context-specific error handling for procedural generation systems. It stores a reference to the system that caused the exception, allowing developers to identify which procedural system encountered an error during execution or configuration.

Constructor & Destructor Documentation

◆ SystemException()

Infinity::Procedural::SystemException::SystemException ( const std::string &  message,
const ProceduralSystem system 
)

Constructs a SystemException with a message and system reference.

Parameters
messageThe error message describing what went wrong.
systemPointer to the ProceduralSystem that caused the exception.

Member Function Documentation

◆ getSystem()

const ProceduralSystem * Infinity::Procedural::SystemException::getSystem ( ) const
noexcept

Retrieves the system that caused the exception.

Returns
A pointer to the ProceduralSystem associated with this exception.

Member Data Documentation

◆ _system

const ProceduralSystem* Infinity::Procedural::SystemException::_system
protected

The system that caused the exception.