bayesException.hpp

Go to the documentation of this file.
00001 #ifndef _BAYES_FILTER_EXCEPTION
00002 #define _BAYES_FILTER_EXCEPTION
00003 
00004 /*
00005  * Bayes++ the Bayesian Filtering Library
00006  * Copyright (c) 2002 Michael Stevens
00007  * See accompanying Bayes++.htm for terms and conditions of use.
00008  *
00009  * $Id: bayesException.hpp 562 2006-04-05 20:46:23 +0200 (Wed, 05 Apr 2006) mistevens $
00010  */
00011 
00012 /*
00013  * Exception types: Exception heirarchy for Bayesian filtering 
00014  */
00015  
00016 // Common headers required for declerations
00017 #include <exception>
00018 
00019 /* Filter namespace */
00020 namespace Bayesian_filter
00021 {
00022 
00023 
00024 class Filter_exception : virtual public std::exception
00025 /*
00026  *  Base class for all exception produced by filter heirachy
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  * Logic Exception
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  * Numeric Exception
00055  */
00056 {
00057 public:
00058     Numeric_exception (const char* description) :
00059         Filter_exception (description)
00060     {}
00061 };
00062 
00063 
00064 }//namespace
00065 #endif

Generated on Wed Oct 4 22:57:23 2006 for Bayes++ Bayesian Filtering Classes by  doxygen 1.4.6