aboutsummaryrefslogtreecommitdiffstats
path: root/core/opt_exception.hpp
blob: 925e4b50c5bcfd3e673e1c1e648c59f362646629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#ifndef OPT_EXCEPTION
#define OPT_EXCEPTION
#include <string>
#include <exception>
namespace opt_utilities
{
  class opt_exception
    :public std::exception
  {
  private:
    std::string _what;
  public:
    opt_exception()
    {};
    
    ~opt_exception()throw()
    {}
    
    opt_exception(const std::string& str)
      :_what(str)
    {}

    const char* what()const throw()
    {
      return _what.c_str();
    }
  };
  
  class target_function_undefined
    :public opt_exception
  {
  public:
    target_function_undefined()
      :opt_exception("target function undefined")
    {}
  };

  class opt_method_undefined
    :public opt_exception
  {
  public:
    opt_method_undefined()
      :opt_exception("opt method undefined")
    {}
  };
  
  class fitter_unset
    :public opt_exception
  {
  public:
    fitter_unset()
      :opt_exception("fitter_unset")
    {}
  };

  class model_undefined
    :public opt_exception
  {
  public:
    model_undefined()
      :opt_exception("model_undefined")
    {}
  };

  class data_unloaded
    :public opt_exception
  {
  public:
    data_unloaded()
      :opt_exception("data not loaded")
    {}
  };


  class statistic_undefined
    :public opt_exception
  {
  public:
    statistic_undefined()
      :opt_exception("statistic undefined")
    {}
  };
  
  class param_not_found
    :public opt_exception
  {
  public:
    param_not_found()
      :opt_exception("param name invalid")
    {}
  };
  
  class param_modifier_undefined
    :public opt_exception
  {
  public:
    param_modifier_undefined()
      :opt_exception("param modifier undefined")
    {}
  };

};


#endif
//EOF