00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __CODEX_CIPHERS_CIPHEREXCEPTIONS_H__
00022 #define __CODEX_CIPHERS_CIPHEREXCEPTIONS_H__
00023
00024 #include <string>
00025
00026 using namespace std;
00027
00032 namespace CODEX_Ciphers
00033 {
00037 class ExceptionBase
00038 {
00039 public :
00045 ExceptionBase( const string& fname, int line ) :
00046 m_fname(fname),
00047 m_line(line)
00048 {}
00049
00051 virtual ~ExceptionBase() {}
00052
00056 void report() const;
00057
00059 const string& fname() const { return m_fname; }
00060
00062 int line() const { return m_line; }
00063
00064 protected :
00069 virtual void derivedMsg() const = 0;
00070
00071 private :
00072 string m_fname;
00073 int m_line;
00074 };
00075
00076 }
00077
00078 #endif