21 #ifndef WML_EXCEPTION_HPP_INCLUDED
22 #define WML_EXCEPTION_HPP_INCLUDED
39 #define __FUNCTION__ "(Unspecified)"
45 #define __func__ __FUNCTION__
49 #define VALIDATE(cond, message) \
52 wml_exception(#cond, __FILE__, __LINE__, __func__, message); \
56 #define VALIDATE_WITH_DEV_MESSAGE(cond, message, dev_message) \
68 #define FAIL(message) \
70 wml_exception(nullptr, __FILE__, __LINE__, __func__, message); \
76 #define FAIL_WITH_DEV_MESSAGE(message, dev_message) \
78 wml_exception(nullptr \
102 ,
const char *
function
twml_exception(const std::string &user_msg, const std::string &dev_msg)
#define IMPLEMENT_LUA_JAILBREAK_EXCEPTION(type)
Helper macro for classes deriving from tlua_jailbreak_exception.
void show(CVideo &video)
Shows the error in a dialog.
std::string deprecate_wml_key_warning(const std::string &key, const std::string &removal_version)
Returns a standard warning message for using a deprecated wml key.
Definitions for the interface to Wesnoth Markup Language (WML).
Variant for storing WML attributes.
std::string user_message
The message for the user explaining what went wrong.
std::string dev_message
The message for developers telling which problem was triggered, this shouldn't be translated...
const config::attribute_value & get_renamed_config_attribute(const config &cfg, const std::string &deprecated_key, const std::string &key, const std::string &removal_version)
Returns a config attribute, using either the old name or the new one.
std::string deprecated_renamed_wml_key_warning(const std::string &deprecated_key, const std::string &key, const std::string &removal_version)
Returns a standard warning message for using a deprecated renamed wml key.
void wml_exception(const char *cond, const char *file, int line, const char *function, const std::string &message, const std::string &dev_message="")
Helper function, don't call this directly.
Base class for exceptions that want to be thrown 'through' lua.
static int cond(LexState *ls)
GLsizei GLenum GLuint GLuint GLsizei char * message
A config object defines a single node in a WML file, with access to child nodes.
Helper class, don't construct this directly.
std::string missing_mandatory_wml_key(const std::string §ion, const std::string &key, const std::string &primary_key="", const std::string &primary_value="")
Returns a standard message for a missing wml key.
GLsizei const GLcharARB ** string