OpenTTD Source 20260206-master-g4d4e37dbf1
error_func.h File Reference

Error reporting related functions. More...

#include "3rdparty/fmt/format.h"

Go to the source code of this file.

Macros

#define UserError(format_string, ...)
#define FatalError(format_string, ...)

Functions

void UserErrorI (const std::string &str)
 Error handling for fatal user errors.
void FatalErrorI (const std::string &str)
 Error handling for fatal non-user errors.

Detailed Description

Error reporting related functions.

Definition in file error_func.h.

Macro Definition Documentation

◆ FatalError

#define FatalError ( format_string,
... )
Value:
FatalErrorI(fmt::format(FMT_STRING(format_string) __VA_OPT__(,) __VA_ARGS__))
void FatalErrorI(const std::string &str)
Error handling for fatal non-user errors.
Definition openttd.cpp:140

Definition at line 18 of file error_func.h.

◆ UserError

#define UserError ( format_string,
... )
Value:
UserErrorI(fmt::format(FMT_STRING(format_string) __VA_OPT__(,) __VA_ARGS__))
void UserErrorI(const std::string &str)
Error handling for fatal user errors.
Definition openttd.cpp:119

Definition at line 17 of file error_func.h.

Function Documentation

◆ FatalErrorI()

void FatalErrorI ( const std::string & msg)

Error handling for fatal non-user errors.

Parameters
strthe string to print.
Note
Does NEVER return.

Error handling for fatal non-user errors.

Parameters
sFormat string.
Note
Function does not return.

Definition at line 140 of file openttd.cpp.

References VideoDriver::GetInstance(), CrashLog::SetErrorMessage(), and ShowOSErrorBox().

◆ UserErrorI()

void UserErrorI ( const std::string & str)

Error handling for fatal user errors.

Parameters
strthe string to print.
Note
Does NEVER return.

Definition at line 119 of file openttd.cpp.

References VideoDriver::GetInstance(), ShowOSErrorBox(), and Driver::Stop().