OpenTTD Source  20240919-master-gdf0233f4c2
Script_FatalError Class Reference

A throw-class that is given when the script made a fatal error. More...

#include <script_fatalerror.hpp>

Public Member Functions

 Script_FatalError (const std::string &msg)
 Creates a "fatal error" exception. More...
 
const std::string & GetErrorMessage () const
 The error message associated with the fatal error. More...
 

Private Attributes

const std::string msg
 The error message.
 

Detailed Description

A throw-class that is given when the script made a fatal error.

Definition at line 16 of file script_fatalerror.hpp.

Constructor & Destructor Documentation

◆ Script_FatalError()

Script_FatalError::Script_FatalError ( const std::string &  msg)
inline

Creates a "fatal error" exception.

Parameters
msgThe message describing the cause of the fatal error.

Definition at line 22 of file script_fatalerror.hpp.

Member Function Documentation

◆ GetErrorMessage()

const std::string& Script_FatalError::GetErrorMessage ( ) const
inline

The error message associated with the fatal error.

Returns
The error message.

Definition at line 30 of file script_fatalerror.hpp.

References msg.

Referenced by ScriptInstance::GameLoop(), ScriptInstance::Initialize(), ScriptInstance::LoadOnStack(), and ScriptInstance::Save().


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