Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PLTextException Class Reference

An object of this class is thrown by other classes when an error occurs. More...

#include <plexcept.h>

Inheritance diagram for PLTextException:

Inheritance graph
[legend]
Collaboration diagram for PLTextException:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLTextException (int Code, const char *pszErr)
 Creates an exception.
 PLTextException (const PLTextException &ex)
 Copy constructor.
virtual ~PLTextException ()
 Destroys an exception.
virtual int GetCode () const
 Returns the code of the error that caused the exception.
virtual operator const char * () const
 This operator allows the exception to be treated as a string whenever needed.

Private Attributes

int m_Code
char * m_pszErr

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 42 of file plexcept.h.


Constructor & Destructor Documentation

PLTextException::PLTextException int  Code,
const char *  pszErr
 

Creates an exception.

Definition at line 22 of file plexcept.cpp.

PLTextException::PLTextException const PLTextException ex  ) 
 

Copy constructor.

Definition at line 39 of file plexcept.cpp.

PLTextException::~PLTextException  )  [virtual]
 

Destroys an exception.

Definition at line 50 of file plexcept.cpp.


Member Function Documentation

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_PL_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.

Definition at line 56 of file plexcept.cpp.

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.

Definition at line 63 of file plexcept.cpp.


Member Data Documentation

int PLTextException::m_Code [private]
 

Definition at line 97 of file plexcept.h.

char* PLTextException::m_pszErr [private]
 

Definition at line 98 of file plexcept.h.


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:01 2004 for vuVolume by  doxygen 1.3.9.1