cwidget 0.5.18
exception.h
1// exception.h -*-c++-*-
2//
3// Copyright (C) 2005, 2007 Daniel Burrows
4// Copyright (C) 2014 Manuel A. Fernandez Montecelo
5//
6// This program is free software; you can redistribute it and/or
7// modify it under the terms of the GNU General Public License as
8// published by the Free Software Foundation; either version 2 of
9// the License, or (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 GNU
14// General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program; see the file COPYING. If not, write to
18// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19// Boston, MA 02111-1307, USA.
20//
21// A generic exception class supporting std::string error messages
22// (unlike std::exception, which only supports const char* error
23// messages). If execinfo is available and ENABLE_DYNAMIC_BACKTRACE
24// is defined, it also generates information about the state of the
25// stack at the time of its instantiation (if not, then
26// get_backtrace() returns an empty string).
27
28#ifndef EXCEPTION_H
29#define EXCEPTION_H
30
31#include <string>
32
33namespace cwidget
34{
35 namespace util
36 {
38 {
42 std::string bt;
43 public:
44 Exception();
45
46 std::string get_backtrace() const { return bt; }
47 virtual std::string errmsg() const = 0;
48 virtual ~Exception() {}
49 };
50 }
51}
52
53#endif
Definition exception.h:38
The namespace containing everything defined by cwidget.
Definition columnify.cc:28