|
OpenTTD Source 20260108-master-g8ba1860eaa
|
Functions/types related to errors from savegames. More...
Go to the source code of this file.
Functions | |
| void | SlError (StringID string, const std::string &extra_msg={}) |
| Error handler. | |
| void | SlErrorCorrupt (const std::string &msg) |
| Error handler for corrupt savegames. | |
| template<typename ... Args> | |
| void | SlErrorCorruptFmt (const fmt::format_string< Args... > format, Args &&... fmt_args) |
| Issue an SlErrorCorrupt with a format string. | |
Functions/types related to errors from savegames.
Definition in file saveload_error.hpp.
| void SlError | ( | StringID | string, |
| const std::string & | extra_msg | ||
| ) |
Error handler.
Sets everything up to show an error message and to clean up the mess of a partial savegame load.
| string | The translatable error message to show. |
| extra_msg | An extra error message coming from one of the APIs. |
Definition at line 339 of file saveload.cpp.
References _gamelog, _load_check_data, _sl, SaveLoadParams::action, LoadCheckData::error, LoadCheckData::error_msg, SaveLoadParams::error_str, SaveLoadParams::extra_msg, SLA_LOAD, SLA_LOAD_CHECK, SLA_PTRS, and SlNullPointers().
Referenced by AfterLoadGame(), DetermineSaveLoadFormat(), DoLoad(), PacketWriter::Finish(), GetSavegameFormat(), LZMALoadFilter::LZMALoadFilter(), LZMASaveFilter::LZMASaveFilter(), LZOLoadFilter::LZOLoadFilter(), LZOSaveFilter::LZOSaveFilter(), MoveWaypointsToBaseStations(), ZlibLoadFilter::Read(), LZMALoadFilter::Read(), LZOLoadFilter::Read(), SaveOrLoad(), SlErrorCorrupt(), PacketWriter::Write(), FileWriter::Write(), ZlibSaveFilter::WriteLoop(), LZMASaveFilter::WriteLoop(), ZlibLoadFilter::ZlibLoadFilter(), and ZlibSaveFilter::ZlibSaveFilter().
| void SlErrorCorrupt | ( | const std::string & | msg | ) |
Error handler for corrupt savegames.
Sets everything up to show the error message and to clean up the mess of a partial savegame load.
| msg | Location the corruption has been spotted. |
Definition at line 369 of file saveload.cpp.
References SlError().
Referenced by AfterLoadGame(), AfterLoadVehiclesPhase2(), ConvertOldMultiheadToNew(), CHKPChunkHandler::FixPointers(), IntToReference(), AIPLChunkHandler::Load(), ANITChunkHandler::Load(), CHTSChunkHandler::Load(), ECMYChunkHandler::Load(), GSDTChunkHandler::Load(), IBLDChunkHandler::Load(), ITBLChunkHandler::Load(), LGRSChunkHandler::Load(), MAPSChunkHandler::Load(), VIEWChunkHandler::Load(), NGRFChunkHandler::Load(), NewGRFMappingChunkHandler::Load(), NAMEChunkHandler::Load(), CITYChunkHandler::Load(), VEHSChunkHandler::Load(), MAPSChunkHandler::LoadCheck(), ScriptInstance::LoadObjects(), LoadSettings(), MoveWaypointsToBaseStations(), LZOLoadFilter::Read(), SetWaterClassDependingOnSurroundings(), SlArray(), SlCompatTableHeader(), SlErrorCorruptFmt(), SlGetStructListLength(), SlLoadCheckChunk(), SlLoadCheckChunks(), SlLoadChunk(), SlLoadChunks(), SlReadSimpleGamma(), SlSaveChunk(), and SlTableHeader().
|
inline |
Issue an SlErrorCorrupt with a format string.
| format_string | The formatting string to tell what to do with the remaining arguments. |
| fmt_args | The arguments to be passed to fmt. |
| Args | The types of the fmt arguments. |
Definition at line 28 of file saveload_error.hpp.
References SlErrorCorrupt().
Referenced by SlAutolength(), SlIterateArray(), SlLoadCheckChunk(), and SlLoadChunk().