VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkErrorCode.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00022 #ifndef __vtkErrorCode_h 00023 #define __vtkErrorCode_h 00024 #include "vtkCommonMiscModule.h" // For export macro 00025 #include "vtkSystemIncludes.h" 00026 00027 // The superclass that all commands should be subclasses of 00028 class VTKCOMMONMISC_EXPORT vtkErrorCode 00029 { 00030 public: 00031 static const char *GetStringFromErrorCode(unsigned long event); 00032 static unsigned long GetErrorCodeFromString(const char *event); 00033 static unsigned long GetLastSystemError(); 00034 //BTX 00035 // all the currently defined error codes 00036 // developers can use -- vtkErrorCode::UserError + int to 00037 // specify their own errors. 00038 // if this list is adjusted, be sure to adjust vtkErrorCodeErrorStrings 00039 // in vtkErrorCode.cxx to match. 00040 enum ErrorIds { 00041 NoError = 0, 00042 FirstVTKErrorCode = 20000, 00043 FileNotFoundError, 00044 CannotOpenFileError, 00045 UnrecognizedFileTypeError, 00046 PrematureEndOfFileError, 00047 FileFormatError, 00048 NoFileNameError, 00049 OutOfDiskSpaceError, 00050 UnknownError, 00051 UserError = 40000 00052 }; 00053 //ETX 00054 }; 00055 00056 #endif /* __vtkErrorCode_h */ 00057 00058 // VTK-HeaderTest-Exclude: vtkErrorCode.h