VTK  9.3.20240425
vtkErrorCode.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
14#ifndef vtkErrorCode_h
15#define vtkErrorCode_h
16#include "vtkCommonMiscModule.h" // For export macro
17#include "vtkSystemIncludes.h"
18
19// The superclass that all commands should be subclasses of
20VTK_ABI_NAMESPACE_BEGIN
21class VTKCOMMONMISC_EXPORT vtkErrorCode
22{
23public:
24 static const char* GetStringFromErrorCode(unsigned long error);
25 static unsigned long GetErrorCodeFromString(const char* error);
26 static unsigned long GetLastSystemError();
27
28 // all the currently defined error codes
29 // developers can use -- vtkErrorCode::UserError + int to
30 // specify their own errors.
31 // if this list is adjusted, be sure to adjust vtkErrorCodeErrorStrings
32 // in vtkErrorCode.cxx to match.
34 {
35 NoError = 0,
36 FirstVTKErrorCode = 20000,
45 UserError = 40000
46 };
47};
48
49VTK_ABI_NAMESPACE_END
50#endif /* vtkErrorCode_h */
51
52// VTK-HeaderTest-Exclude: vtkErrorCode.h
superclass for error codes
static unsigned long GetLastSystemError()
static unsigned long GetErrorCodeFromString(const char *error)
@ UnrecognizedFileTypeError
@ PrematureEndOfFileError
static const char * GetStringFromErrorCode(unsigned long error)