1 /*  dvbcut
2     Copyright (c) 2007 Sven Over <svenover@svenover.de>
3 
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8 
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13 
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18 
19 /* $Id$ */
20 
21 #ifndef _DVBCUT_EXCEPTION_H
22 #define _DVBCUT_EXCEPTION_H
23 
24 #include <exception>
25 #include <string>
26 
27 class dvbcut_exception : public std::exception
28 {
29 protected:
30   std::string _M_msg;
31   std::string _M_extype;
32 public:
33   explicit dvbcut_exception(const std::string &__arg);
34   explicit dvbcut_exception(const char* __arg);
35   virtual ~dvbcut_exception() throw();
36 
37   virtual const char *what() const throw();
38 
msg()39   const std::string &msg() const throw() { return _M_msg; }
type()40   const std::string &type() const throw() { return _M_extype; }
41 
42   void show() const;
43 };
44 
45 #endif // ifndef _DVBCUT_EXCEPTION_H
46