Public Member Functions | Public Attributes

twml_exception Struct Reference

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

#include <wml_exception.hpp>

Inheritance diagram for twml_exception:
Inheritance graph
[legend]
Collaboration diagram for twml_exception:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 twml_exception (const std::string &user_msg, const std::string &dev_msg)
 ~twml_exception () throw ()
void show (display &disp)
 Shows the error in a dialog.

Public 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.

Detailed Description

Helper class, don't construct this directly.

Definition at line 108 of file wml_exception.hpp.


Constructor & Destructor Documentation

twml_exception::twml_exception ( const std::string &  user_msg,
const std::string &  dev_msg 
) [inline]

Definition at line 111 of file wml_exception.hpp.

twml_exception::~twml_exception (  )  throw () [inline]

Definition at line 117 of file wml_exception.hpp.


Member Function Documentation

void twml_exception::show ( display disp  ) 

Shows the error in a dialog.

Parameters:
disp The display object to show the message on.

Definition at line 59 of file wml_exception.cpp.

References _, dev_message, gui2::show_error_message(), user_message, and display::video().

Referenced by editor::editor_controller::do_screenshot(), game_controller::launch_game(), game_controller::load_game(), editor::editor_controller::main_loop(), game_controller::new_campaign(), play_game(), game_controller::play_multiplayer(), game_controller::play_multiplayer_mode(), play_replay(), game_controller::play_replay(), and WML_HANDLER_FUNCTION().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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 130 of file wml_exception.hpp.

Referenced by game_info::game_info(), mp::create::hide_children(), main(), mp::create::process_event(), mp::gamebrowser::set_game_items(), and show().

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 123 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:14:56 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs