FlightGear next
exceptions.hxx
Go to the documentation of this file.
1// -*- coding: utf-8 -*-
2//
3// exceptions.hxx --- Exception classes for the FlightGear add-on infrastructure
4// Copyright (C) 2017 Florent Rougon
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//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License along
17// with this program; if not, write to the Free Software Foundation, Inc.,
18// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20#ifndef FG_ADDON_EXCEPTIONS_HXX
21#define FG_ADDON_EXCEPTIONS_HXX
22
23#include <string>
24
25#include <simgear/structure/exception.hxx>
26
27namespace flightgear
28{
29
30namespace addons
31{
32
33namespace errors
34{
35
36class error : public sg_exception
37{
38public:
39 explicit error(const std::string& message,
40 const std::string& origin = std::string());
41 explicit error(const char* message, const char* origin = nullptr);
42};
43
44class error_loading_config_file : public error
45{ using error::error; /* inherit all constructors */ };
46
47class no_metadata_file_found : public error
48{ using error::error; };
49
50class error_loading_metadata_file : public error
51{ using error::error; };
52
54{ using error::error; };
55
57{ using error::error; };
58
59class fg_version_too_old : public error
60{ using error::error; };
61
62class fg_version_too_recent : public error
63{ using error::error; };
64
65class invalid_resource_path : public error
66{ using error::error; };
67
69{ using error::error; };
70
71} // of namespace errors
72
73} // of namespace addons
74
75} // of namespace flightgear
76
77#endif // of FG_ADDON_EXCEPTIONS_HXX
error(const std::string &message, const std::string &origin=std::string())
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...
Definition Addon.cxx:53