OpenTTD: GRFError Struct Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
GRFError Struct Reference

Information about why GRF had problems during initialisation. More...

`#include <newgrf_config.h>`

Inheritance diagram for GRFError:

## Public Member Functions
| GRFError (StringID severity, StringID message=0)
| Construct a new GRFError.
| GRFError (const GRFError &error)
| Create a new GRFError that is a deep copy of an existing error message.
Public Member Functions inherited from ZeroedMemoryAllocator
void * | operator new (size_t size)
| Memory allocator for a single class instance.
void * | operator new[] (size_t size)
| Memory allocator for an array of class instances.
void | operator delete (void *ptr)
| Memory release for a single class instance.
void | operator delete[] (void *ptr)
| Memory release for an array of class instances.

## Data Fields
char * | custom_message
| Custom message (if present)
char * | data
| Additional data for message and custom_message.
StringID | message
| Default message.
StringID | severity
| Info / Warning / Error / Fatal.
uint32 | param_value [2]
| Values of GRF parameters to show for message and custom_message.

## Detailed Description

Information about why GRF had problems during initialisation.

Definition at line 103 of file newgrf_config.h.

## Constructor & Destructor Documentation

GRFError::GRFError | ( | StringID | severity,
|  | StringID | message = `0`
| ) |  |

Construct a new GRFError.

Parameters

  severity | The severity of this error.
  message | The actual error-string.

Definition at line 202 of file newgrf_config.cpp.

GRFError::GRFError | ( | const GRFError & | error | ) |

Create a new GRFError that is a deep copy of an existing error message.

Parameters

  error | The GRFError object to make a copy of.

Definition at line 212 of file newgrf_config.cpp.

References custom_message, data, param_value, and stredup().

The documentation for this struct was generated from the following files:

- src/newgrf_config.h
- src/newgrf_config.cpp