FlightGear next
exceptions.cxx
Go to the documentation of this file.
1// -*- coding: utf-8 -*-
2//
3// exceptions.cxx --- 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#include <string>
21
22#include <simgear/structure/exception.hxx>
23
24#include "exceptions.hxx"
25
26using std::string;
27
28namespace flightgear
29{
30
31namespace addons
32{
33
34namespace errors
35{
36
37// ***************************************************************************
38// * Base class for add-on exceptions *
39// ***************************************************************************
40
41// Prepending a prefix such as "Add-on error: " would be redundant given the
42// messages used in, e.g., the Addon class code.
43error::error(const string& message, const string& origin)
44 : sg_exception(message, origin)
45{ }
46
47error::error(const char* message, const char* origin)
48 : error(string(message), string(origin))
49{ }
50
51} // of namespace errors
52
53} // of namespace addons
54
55} // of namespace flightgear
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