libkindrv  0.1
exception.h
1 
2 /***************************************************************************
3  * exception.h - KinDrv exceptions
4  *
5  * Created: Fri Oct 11 00:31:00 2013
6  * Copyright 2013 Bahram Maleki-Fard
7  ****************************************************************************/
8 
9 /* This file is part of libkindrv.
10  *
11  * libkindrv is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * Foobar is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser Public License
22  * along with libkindrv. If not, see <http://www.gnu.org/licenses/>.
23  */
24 
25 #ifndef _EXCEPTION_H
26 #define _EXCEPTION_H
27 
28 #include "types.h"
29 
30 #include <exception>
31 
32 namespace KinDrv {
33 
35 class KinDrvException : public std::exception
36 {
37  public:
38  KinDrvException() throw();
39  KinDrvException(const char *msg) throw();
40  KinDrvException(error_t err, const char *msg) throw();
41  virtual ~KinDrvException() throw();
42 
43  const char* what() const throw();
44  const error_t error() const throw();
45 
46  private:
47  char *__msg;
48  error_t __err;
49 };
50 
51 } // end namespace KinDrv
52 #endif
virtual ~KinDrvException()
Definition: exception.cpp:64
KinDrvException()
Definition: exception.cpp:35
const error_t error() const
Definition: exception.cpp:80
Exception that is thrown by this Api.
Definition: exception.h:35
const char * what() const
Definition: exception.cpp:71