MTF
excpUtils.h
1 #ifndef MTF_EXCP_UTILS_H
2 #define MTF_EXCP_UTILS_H
3 
4 #include<stdexcept>
5 
6 namespace mtf {
7  namespace utils{
8  class Exception : public std::exception {
9  public:
10  Exception(const char* _error = "Exception encountered") :
11  std::exception(), error(_error){}
12  Exception(const std::string _error = "Exception encountered") :
13  std::exception(), error(_error){}
14  const char* what() const noexcept override{ return error.c_str(); }
15  virtual const char* type() const noexcept = 0;
16  private:
17  const std::string error;
18  };
19 
20  class InvalidTrackerState : public Exception {
21  public:
22  InvalidTrackerState(const char* error = "Invalid Tracker State found") :
23  Exception(error){}
24  InvalidTrackerState(const std::string error = "Invalid Tracker State found") :
25  Exception(error){}
26  const char* type() const noexcept override{ return "InvalidTrackerState"; }
27  };
28 
30  public:
31  FunctonNotImplemented(const char* error = "Function has not been implemented yet") :
32  Exception(error){}
33  FunctonNotImplemented(const std::string error = "Function has not been implemented yet") :
34  Exception(error){}
35  const char* type() const noexcept override{ return "FunctonNotImplemented"; }
36  };
37 
38  class InvalidArgument : public Exception {
39  public:
40  InvalidArgument(const char* error = "Invalid argument provided") :
41  Exception(error){}
42  InvalidArgument(const std::string error = "Invalid argument provided") :
43  Exception(error){}
44  const char* type() const noexcept override{ return "InvalidArgument"; }
45  };
46 
47  class LogicError : public Exception {
48  public:
49  LogicError(const char* error = "Logical error encountered") :
50  Exception(error){}
51  LogicError(const std::string error = "Logical error encountered") :
52  Exception(error){}
53  const char* type() const noexcept override{ return "LogicError"; }
54  };
55  }
56 }
57 #endif
Definition: excpUtils.h:47
Definition: excpUtils.h:38
Definition: excpUtils.h:8
Definition: excpUtils.h:29
Definition: RegNetParams.h:32
basic functions for preprocessing the raw input image using filtering, resizing and histogram equaliz...
Definition: histUtils.h:20
Definition: excpUtils.h:20