00001 #ifndef _BAYES_FILTER_EXCEPTION
00002 #define _BAYES_FILTER_EXCEPTION
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <exception>
00018
00019
00020 namespace Bayesian_filter
00021 {
00022
00023
00024 class Filter_exception : virtual public std::exception
00025
00026
00027
00028 {
00029 public:
00030 const char *what() const throw()
00031 { return error_description;
00032 }
00033 protected:
00034 Filter_exception (const char* description)
00035 { error_description = description;
00036 }
00037 private:
00038 const char* error_description;
00039 };
00040
00041 class Logic_exception : virtual public Filter_exception
00042
00043
00044
00045 {
00046 public:
00047 Logic_exception (const char* description) :
00048 Filter_exception (description)
00049 {}
00050 };
00051
00052 class Numeric_exception : virtual public Filter_exception
00053
00054
00055
00056 {
00057 public:
00058 Numeric_exception (const char* description) :
00059 Filter_exception (description)
00060 {}
00061 };
00062
00063
00064 }
00065 #endif