Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

PLTextException Class Reference

#include <plexcept.h>

Inheritance diagram for PLTextException:

List of all members.

Public Member Functions

 PLTextException (int Code, const char *pszErr)
 Creates an exception.

 PLTextException (int Code, int MinorCode, const char *pszErr)
 Creates an exception.

 PLTextException (const PLTextException &ex)
 Copy constructor.

virtual ~PLTextException ()
 Destroys an exception.

virtual int GetCode () const
int GetMinorCode () const
virtual operator const char * () const

Detailed Description

An object of this class is thrown by other classes when an error occurs. It contains an error code and a string describing the error. The error code is meant to be used internally in the program; the descriptive string can be output to the user. Error codes and strings do not correspond 1:1. The strings are more precise.

Definition at line 52 of file plexcept.h.


Member Function Documentation

virtual int PLTextException::GetCode  )  const [virtual]
 

Returns the code of the error that caused the exception. Valid error codes are:

PL_ERRWRONG_SIGNATURE (1): Expected file signature not found.

PL_ERRFORMAT_UNKNOWN (2): Unexpected data encountered. This probably indicates a corrupt file or an unknown file sub-format.

PL_ERRPATH_NOT_FOUND (3), PL_ERRFILE_NOT_FOUND (4), PL_ERRACCESS_DENIED (5): Problems with the file system.

PL_ERRFORMAT_NOT_SUPPORTED (6): Known but unsupported format.

PL_ERRINTERNAL (7): Kaputt. Tell me about it.

PL_ERRUNKNOWN_FILE_TYPE (8): Couldn't recognize the file type.

PL_ERRDIB_TOO_LARGE (9): Maximum size for 1 bmp was exceeded. (See MAX_BITMAP_SIZE above for an explanation).

PL_ERRNO_MEMORY (10): Out of memory.

PL_ERREND_OF_FILE (11): End of file reached before end of image.

PL_ERRFORMAT_NOT_COMPILED (12): Support for this file format was #ifdef'ed out.

PL_ERRURL_SOURCE (13): Curl returned error.

PL_ERRBAD_EXIF (14): Error decoding EXIF data. PL_ERRDFB (15): Directfb operation failed.

int PLTextException::GetMinorCode  )  const
 

In case of PL_ERRURL_SOURCE, the actual curl error code (from curl.h) is placed here.

virtual PLTextException::operator const char *  )  const [virtual]
 

This operator allows the exception to be treated as a string whenever needed. The string contains the error message.


The documentation for this class was generated from the following file:
Generated on Sun Jun 6 13:42:23 2004 for paintlib by doxygen 1.3.2