VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/Misc/vtkErrorCode.h
Go to the documentation of this file.
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 =========================================================================*/
00025 #ifndef vtkErrorCode_h
00026 #define vtkErrorCode_h
00027 #include "vtkCommonMiscModule.h" // For export macro
00028 #include "vtkSystemIncludes.h"
00029 
00030 // The superclass that all commands should be subclasses of
00031 class VTKCOMMONMISC_EXPORT vtkErrorCode
00032 {
00033 public:
00034   static const char *GetStringFromErrorCode(unsigned long event);
00035   static unsigned long GetErrorCodeFromString(const char *event);
00036   static unsigned long GetLastSystemError();
00037 //BTX
00038   // all the currently defined error codes
00039   // developers can use -- vtkErrorCode::UserError + int to
00040   // specify their own errors.
00041   // if this list is adjusted, be sure to adjust vtkErrorCodeErrorStrings
00042   // in vtkErrorCode.cxx to match.
00043   enum ErrorIds {
00044     NoError = 0,
00045     FirstVTKErrorCode = 20000,
00046     FileNotFoundError,
00047     CannotOpenFileError,
00048     UnrecognizedFileTypeError,
00049     PrematureEndOfFileError,
00050     FileFormatError,
00051     NoFileNameError,
00052     OutOfDiskSpaceError,
00053     UnknownError,
00054     UserError = 40000
00055   };
00056 //ETX
00057 };
00058 
00059 #endif /* vtkErrorCode_h */
00060 
00061 // VTK-HeaderTest-Exclude: vtkErrorCode.h