VTK  9.1.0
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
29class VTKCOMMONMISC_EXPORT vtkErrorCode
30{
31public:
32 static const char* GetStringFromErrorCode(unsigned long error);
33 static unsigned long GetErrorCodeFromString(const char* error);
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.
42 {
43 NoError = 0,
44 FirstVTKErrorCode = 20000,
53 UserError = 40000
54 };
55};
56
57#endif /* vtkErrorCode_h */
58
59// VTK-HeaderTest-Exclude: vtkErrorCode.h
superclass for error codes
Definition: vtkErrorCode.h:30
static unsigned long GetLastSystemError()
static unsigned long GetErrorCodeFromString(const char *error)
@ UnrecognizedFileTypeError
Definition: vtkErrorCode.h:47
@ PrematureEndOfFileError
Definition: vtkErrorCode.h:48
static const char * GetStringFromErrorCode(unsigned long error)