The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
wesnothd_connection_error.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2016 by Sergey Popov <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
17 #include <boost/system/error_code.hpp>
18 #include "exceptions.hpp"
20 ///An error occured during when trying to coommunicate with the wesnothd server.
21 struct wesnothd_error : public game::error
22 {
23  wesnothd_error(const std::string& error) : game::error(error) {}
24 };
25 
26 ///We received invalid data from wesnothd during a game
27 ///This means we cannot continue with the game but we can stay connected to wesnothd and start a new game
28 ///TODO: find a short name
30 {
33 };
34 
35 
36 ///an error occured inside the underlying network comminication code (boost asio)
37 ///TODO: find a short name
39 {
40  wesnothd_connection_error(const boost::system::error_code& error) : wesnothd_error(error.message()) {}
42 };
43 
an error occured inside the underlying network comminication code (boost asio) TODO: find a short nam...
An error occured during when trying to coommunicate with the wesnothd server.
wesnothd_connection_error(const boost::system::error_code &error)
#define IMPLEMENT_LUA_JAILBREAK_EXCEPTION(type)
Helper macro for classes deriving from tlua_jailbreak_exception.
wesnothd_error(const std::string &error)
ingame_wesnothd_error(const std::string &error)
We received invalid data from wesnothd during a game This means we cannot continue with the game but ...
Base class for exceptions that want to be thrown 'through' lua.
Base class for all the errors encountered by the engine.
Definition: exceptions.hpp:27
GLsizei GLenum GLuint GLuint GLsizei char * message
Definition: glew.h:2499
GLsizei const GLcharARB ** string
Definition: glew.h:4503