Bayes++ Bayesian Filtering Classes Release 2014.5 - Copyright (c) 2003,2004,2005,2006,2011,2012,2014 Michael Stevens
bayesException.hpp
Go to the documentation of this file.
1#ifndef _BAYES_FILTER_EXCEPTION
2#define _BAYES_FILTER_EXCEPTION
3
4/*
5 * Bayes++ the Bayesian Filtering Library
6 * Copyright (c) 2002 Michael Stevens
7 * See accompanying Bayes++.htm for terms and conditions of use.
8 *
9 * $Id$
10 */
11
12/*
13 * Exception types: Exception hierarchy for Bayesian filtering
14 */
15
16// Common headers required for declerations
17#include <exception>
18
19/* Filter namespace */
21{
22
23
24class Filter_exception : virtual public std::exception
25/*
26 * Base class for all exception produced by filter hierarchy
27 */
28{
29public:
30 const char *what() const throw()
31 { return error_description;
32 }
33protected:
34 Filter_exception (const char* description)
35 { error_description = description;
36 }
37private:
38 const char* error_description;
39};
40
41class Logic_exception : virtual public Filter_exception
42/*
43 * Logic Exception
44 */
45{
46public:
47 Logic_exception (const char* description) :
48 Filter_exception (description)
49 {}
50};
51
52class Numeric_exception : virtual public Filter_exception
53/*
54 * Numeric Exception
55 */
56{
57public:
58 Numeric_exception (const char* description) :
59 Filter_exception (description)
60 {}
61};
62
63
64}//namespace
65#endif
Definition bayesException.hpp:28
Filter_exception(const char *description)
Definition bayesException.hpp:34
const char * what() const
Definition bayesException.hpp:30
Definition bayesException.hpp:45
Logic_exception(const char *description)
Definition bayesException.hpp:47
Definition bayesException.hpp:56
Numeric_exception(const char *description)
Definition bayesException.hpp:58
Definition bayesException.hpp:21