Common/vtkErrorCode.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkErrorCode.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkErrorCode.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00037 #ifndef __vtkErrorCode_h
    00038 #define __vtkErrorCode_h
    00039
    00040 // The superclass that all commands should be subclasses of
    00041 class vtkErrorCode
    00042 {
    00043 public:
    00044   static const char *GetStringFromErrorCode(unsigned long event);
    00045   static unsigned long GetErrorCodeFromString(const char *event);
    00046
    00047 //BTX
    00048   // all the currently defined error codes
    00049   // developers can use -- vtkErrorCode::UserError + int to
    00050   // specify their own errors.
    00051   // if this list is adjusted, be sure to adjust vtkErrorCodeErrorStrings
    00052   // in vtkErrorCode.cxx to match.
    00053   enum ErrorIds {
    00054     NoError = 0,
    00055     FileNotFoundError,
    00056     CannotOpenFileError,
    00057     UnrecognizedFileTypeError,
    00058     PrematureEndOfFileError,
    00059     FileFormatError,
    00060     NoFileNameError,
    00061     UnknownError,
    00062     UserError = 1000
    00063   };
    00064 //ETX
    00065 };
    00066
    00067 #endif /* __vtkErrorCode_h */
    00068