#include <Flate.hh>
this CError class is thrown when the zlib wrapper function encounter any error.
|
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 } |
|
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 } |
|
Initial value: { "no error" , "standard error" , "stream error" , "data error" , "memory error" , "buffer error" , "version error", "unknown error" } |