libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
error.h
Go to the documentation of this file.
1 /* libIntegra modular audio framework
2  *
3  * Copyright (C) 2007 Birmingham City University
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18  * USA.
19  */
20 
26 #ifndef INTEGRA_ERROR_DEFINED
27 #define INTEGRA_ERROR_DEFINED
28 
29 #include "common_typedefs.h"
30 
31 namespace integra_api
32 {
40  class INTEGRA_API CError
41  {
42  public:
43 
45  enum code
46  {
48  INPUT_ERROR = -1,
49 
51  SUCCESS = 0,
52 
54  FAILED = 1,
55 
57  TYPE_ERROR = 2,
58 
60  PATH_ERROR = 3,
61 
63  CONSTRAINT_ERROR = 4,
64 
66  REENTRANCE_ERROR = 5,
67 
69  FILE_VALIDATION_ERROR = 6,
70 
72  FILE_MORE_RECENT_ERROR = 7,
73 
75  MODULE_ALREADY_INSTALLED = 8
76  };
77 
78  CError();
79 
82  CError( code error_code );
83 
86  operator code() const;
87 
91  string get_text() const;
92 
93  private:
94 
95  code m_error_code;
96  };
97 }
98 
99 
100 
101 #endif /*INTEGRA_ERROR_DEFINED*/
code
Definition: error.h:45
Represents an enumeration of error codes.
Definition: error.h:40
#defines and typedefs used throughout the application