VTK
vtkErrorCode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkErrorCode.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtkErrorCode_h
24 #define vtkErrorCode_h
25 #include "vtkCommonMiscModule.h" // For export macro
26 #include "vtkSystemIncludes.h"
27 
28 // The superclass that all commands should be subclasses of
29 class VTKCOMMONMISC_EXPORT vtkErrorCode
30 {
31 public:
32  static const char *GetStringFromErrorCode(unsigned long event);
33  static unsigned long GetErrorCodeFromString(const char *event);
34  static unsigned long GetLastSystemError();
35 
36  // all the currently defined error codes
37  // developers can use -- vtkErrorCode::UserError + int to
38  // specify their own errors.
39  // if this list is adjusted, be sure to adjust vtkErrorCodeErrorStrings
40  // in vtkErrorCode.cxx to match.
41  enum ErrorIds {
42  NoError = 0,
43  FirstVTKErrorCode = 20000,
52  UserError = 40000
53  };
54 
55 };
56 
57 #endif /* vtkErrorCode_h */
58 
59 // VTK-HeaderTest-Exclude: vtkErrorCode.h
superclass for error codes
Definition: vtkErrorCode.h:29