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
27
namespace
flightgear
28
{
29
30
namespace
addons
31
{
32
33
namespace
errors
34
{
35
36
class
error
:
public
sg_exception
37
{
38
public
:
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
44
class
error_loading_config_file
:
public
error
45
{
using
error::error
;
/* inherit all constructors */
};
46
47
class
no_metadata_file_found
:
public
error
48
{
using
error::error
; };
49
50
class
error_loading_metadata_file
:
public
error
51
{
using
error::error
; };
52
53
class
error_loading_menubar_items_file
:
public
error
54
{
using
error::error
; };
55
56
class
duplicate_registration_attempt
:
public
error
57
{
using
error::error
; };
58
59
class
fg_version_too_old
:
public
error
60
{
using
error::error
; };
61
62
class
fg_version_too_recent
:
public
error
63
{
using
error::error
; };
64
65
class
invalid_resource_path
:
public
error
66
{
using
error::error
; };
67
68
class
unable_to_create_addon_storage_dir
:
public
error
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
flightgear::addons::errors::duplicate_registration_attempt
Definition
exceptions.hxx:57
flightgear::addons::errors::error_loading_config_file
Definition
exceptions.hxx:45
flightgear::addons::errors::error_loading_menubar_items_file
Definition
exceptions.hxx:54
flightgear::addons::errors::error_loading_metadata_file
Definition
exceptions.hxx:51
flightgear::addons::errors::error::error
error(const std::string &message, const std::string &origin=std::string())
flightgear::addons::errors::fg_version_too_old
Definition
exceptions.hxx:60
flightgear::addons::errors::fg_version_too_recent
Definition
exceptions.hxx:63
flightgear::addons::errors::invalid_resource_path
Definition
exceptions.hxx:66
flightgear::addons::errors::no_metadata_file_found
Definition
exceptions.hxx:48
flightgear::addons::errors::unable_to_create_addon_storage_dir
Definition
exceptions.hxx:69
flightgear::addons::errors
Definition
addon_fwd.hxx:53
flightgear::addons
Definition
Addon.cxx:56
flightgear
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...
Definition
Addon.cxx:53
src
Add-ons
exceptions.hxx
Generated on Tue Jun 3 2025 12:58:36 for FlightGear by
1.13.2