DLException.h

Go to the documentation of this file.
00001 #ifndef _DLEXCEPTION_H_
00002 #define _DLEXCEPTION_H_
00003 
00004 #include "DLException.h"
00005 #include <string>
00006 #include <stdexcept>
00007 using namespace std;
00008 
00016 enum DLExceptionCodes {
00017    DL_IO_EXCEPTION = 1,
00018    DL_FILE_NOT_FOUND_EXCEPTION = 2,
00021    DL_NOT_IMPLEMENTED_EXCEPTION = 3,
00022    DL_UNKNOWN_FILE_FORMAT_EXCEPTION = 4,
00024    DL_NULL_POINTER_EXCEPTION = 5,
00025    DL_UNKNOWN_OBJECT_EXCEPTION = 6,
00026    DL_WRONG_FORMAT_EXCEPTION = 7,
00027    DL_NOT_SUPPORTED_IMAGE_EXCEPTION = 8,
00028    DL_OUT_IMAGE_BOUNDARY_EXCEPTION = 9,
00029    DL_OUT_CHANNEL_NUMBER_EXCEPTION = 10,
00030    DL_NOT_SUPPORTED_EXCEPTION = 11,
00031    DL_UNKNOWN_TAG_EXCEPTION = 12,
00032    DL_MEMORY_EXCEPTION = 13,
00033    DL_PARAMETERS_EXCEPTION = 14,
00034    DL_INVALID_PAGE_NUMBER= 15,
00036    DL_DEPRECATED_EXCEPTION = 16,
00037    DL_INDEX_OUT_OF_BOUND = 17
00038 };
00039 
00110 class DLException : public std::exception
00111 {
00112   
00113    public:
00117    DLException();
00118   
00122    DLException(const DLException & orig);
00123   
00128    const DLException & operator=(const DLException & right);
00129   
00160    DLException(DLExceptionCodes errCode, const char* str, const char* filename = 0, const int lineNum = 0);
00161   
00165    string dlGetErrorMsg() const;
00166   
00189    DLExceptionCodes dlGetErrorID() const;
00190 
00195    const char *what() const throw();
00196   
00200    virtual ~DLException() throw ();
00201   
00202   
00203    protected:
00205    string errorMessage;
00207    DLExceptionCodes errorID;
00208         
00209 };//end class
00210 #endif //_DLEXCEPTION_H_

DOCLIB is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007