The Battle for Wesnoth
1.19.5+dev
sdl
exception.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2014 - 2024
3
by Mark de Wever <koraq@xs4all.nl>
4
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY.
12
13
See the COPYING file for more details.
14
*/
15
16
#pragma once
17
18
/**
19
* @file
20
* Contains a basic exception class for SDL operations.
21
*/
22
23
#include "
exceptions.hpp
"
24
25
namespace
sdl
26
{
27
28
struct
exception
:
public
game::error
29
{
30
/**
31
* Constructor.
32
*
33
* @param operation The operation that has failed.
34
* @param use_sdl_error If set to @c true the @p operation is
35
* appended with the SDL error message. Else the
36
* @p operation is the error message for the
37
* exception.
38
*/
39
exception
(
const
std::string& operation,
const
bool
use_sdl_error);
40
};
41
42
43
}
// namespace sdl
sdl
Definition:
exception.cpp:21
exceptions.hpp
game::error
Base class for all the errors encountered by the engine.
Definition:
exceptions.hpp:29
sdl::exception
Definition:
exception.hpp:29
sdl::exception::exception
exception(const std::string &operation, const bool use_sdl_error)
Constructor.
Definition:
exception.cpp:33
Generated by
1.9.1