CryptoException.h

00001 // $Id: CryptoException.h 21 2010-09-05 04:18:17Z cschwarz1 $
00002 
00003 #ifndef BASE_CRYPTO_CRYPTOEXCEPTION_H
00004 #define BASE_CRYPTO_CRYPTOEXCEPTION_H
00005 
00006 #include "libppbase/base/Exception.h"
00007 
00008 namespace base_crypto {
00015     class PPBASE_CRYPTO_EXPORT CryptoException: public base::Exception {
00016     public:
00018         enum err {
00019             errOpenSSL = 1,  
00020             errRegClient     
00021         };
00022 
00030         CryptoException(err errcode, const char *fmt = NULL, ...)
00031         #ifdef __GNUC__
00032             __attribute__((format(printf, 3, 4)));
00033         #else
00034             ;
00035         #endif
00036 
00038         static void finit();
00039 
00045         long getErrno() const;
00046 
00048         static void init();
00049 
00055         virtual base::String toString() const;
00056 
00057     private:
00058         long _errno;   
00059     };
00060 }
00061 
00062 #endif