The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
wml_exception Struct Reference

Helper class, don't construct this directly. More...

#include <wml_exception.hpp>

Inheritance diagram for wml_exception:
Inheritance graph

Public Member Functions

 wml_exception (const std::string &user_msg, const std::string &dev_msg)
 
 ~wml_exception () NOEXCEPT
 
void show ()
 Shows the error in a dialog. More...
 
- Public Member Functions inherited from lua_jailbreak_exception
virtual ~lua_jailbreak_exception () NOEXCEPT
 
void store () const NOEXCEPT
 Stores a copy the current exception to be rethrown. More...
 

Public Attributes

std::string user_message
 The message for the user explaining what went wrong. More...
 
std::string dev_message
 The message for developers telling which problem was triggered, this shouldn't be translated. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from lua_jailbreak_exception
static void rethrow ()
 Rethrows the stored exception. More...
 
- Static Protected Attributes inherited from lua_jailbreak_exception
static lua_jailbreak_exceptionjailbreak_exception = nullptr
 The exception to be rethrown. More...
 

Detailed Description

Helper class, don't construct this directly.

Definition at line 92 of file wml_exception.hpp.

Constructor & Destructor Documentation

wml_exception::wml_exception ( const std::string &  user_msg,
const std::string &  dev_msg 
)
inline

Definition at line 95 of file wml_exception.hpp.

wml_exception::~wml_exception ( )
inline

Definition at line 101 of file wml_exception.hpp.

Member Function Documentation

void wml_exception::show ( )

Member Data Documentation

std::string wml_exception::dev_message

The message for developers telling which problem was triggered, this shouldn't be translated.

It's hard for a dev to parse errors in foreign tongues.

Definition at line 114 of file wml_exception.hpp.

Referenced by mp::game_info::game_info(), main(), ng::scenario::set_metadata(), show(), and game_launcher::unit_test().

std::string wml_exception::user_message

The message for the user explaining what went wrong.

This message can be translated so the user gets a explanation in his/her native tongue.

Definition at line 107 of file wml_exception.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), editor::editor_map::from_string(), main(), and show().


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