Codefix: Sprite offsets and counts are not SpriteIDs. (#13336)
[openttd-github.git] / src / script / script_fatalerror.hpp
blob96c64e0b9df7ab04d4d22914e64d9087e9c1ce4c
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file script_fatalerror.hpp The definition of Script_FatalError. */
10 #ifndef SCRIPT_FATALERROR_HPP
11 #define SCRIPT_FATALERROR_HPP
13 /**
14 * A throw-class that is given when the script made a fatal error.
16 class Script_FatalError {
17 public:
18 /**
19 * Creates a "fatal error" exception.
20 * @param msg The message describing the cause of the fatal error.
22 Script_FatalError(const std::string &msg) :
23 msg(msg)
26 /**
27 * The error message associated with the fatal error.
28 * @return The error message.
30 const std::string &GetErrorMessage() const { return msg; }
32 private:
33 const std::string msg; ///< The error message.
36 #endif /* SCRIPT_FATALERROR_HPP */