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

zlib::CError Class Reference

the zlib exception class More...

#include <Flate.hh>

List of all members.

Public Methods

Static Private Methods

Static Private Attributes


Detailed Description

the zlib exception class

this CError class is thrown when the zlib wrapper function encounter any error.


Constructor & Destructor Documentation

zlib::CError::CError int    err
 

constructor. construct an object with a zlib error code. it will look up the error code to find an error message string by calling LookUp().

00053     : std::runtime_error( Lookup( err ) )
00054 {
00055 }


Member Function Documentation

const std::string & zlib::CError::Lookup int    err [static, private]
 

return an error message string by looking up the table.

00060 {
00061     const int size = sizeof( TABLE ) / sizeof( std::string ) ;
00062 
00063     if ( err >= 0 && err < size )
00064         return TABLE[err] ;
00065     else
00066         return TABLE[size-1] ;
00067 }


Member Data Documentation

const std::string zlib::CError::TABLE [static, private]
 

Initial value:

{
    "no error" ,
    "standard error" ,
    "stream error" ,
    "data error" ,
    "memory error" ,
    "buffer error" ,
    "version error",
    "unknown error"
}


The documentation for this class was generated from the following files:
Generated on Sun Feb 2 09:17:37 2003 for libpdf++ by doxygen1.2.16