OpenTTD Source 20241224-master-gee860a5c8e
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.
 
const std::string & GetErrorMessage () const
 The error message associated with the fatal error.
 

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 ScriptScanner::AddFile(), ScriptInstance::Initialize(), ScriptInstance::LoadOnStack(), and ScriptInstance::Save().

Field Documentation

◆ msg

const std::string Script_FatalError::msg
private

The error message.

Definition at line 33 of file script_fatalerror.hpp.

Referenced by GetErrorMessage().


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