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