faif
TimeseriesExceptions.hpp
1 #ifndef FAIF_TS_EXCEPTIONS
2 #define FAIF_TS_EXCEPTIONS
3 
4 #include "../ExceptionsFaif.hpp"
5 #include "TimeSeries.hpp"
6 
7 namespace faif {
8  namespace timeseries {
9 
10  //! bad prediction range exception
12  public:
13  //! constructor
14  PredictionRangeException(DigitTime f, DigitTime t) : from_(f), to_(t) {}
15  //! what
16  virtual const char* what() const throw() { return "Prediction Range Exception "; }
17  //! print
18  virtual std::ostream& print(std::ostream& os) const throw() {
19  os << "Prediction range error: from = '" << from_ << "' to = '" << to_ << "'";
20  return os;
21  }
22  private:
23  DigitTime from_;
24  DigitTime to_;
25  };
26 
27  } //namespace timeseries
28 } //namespace faif
29 
30 #endif //FAIF_TS_EXCEPTIONS
virtual const char * what() const
what
Definition: TimeseriesExceptions.hpp:16
bad prediction range exception
Definition: TimeseriesExceptions.hpp:11
Definition: Chain.h:17
the base exception class for faif library
Definition: ExceptionsFaif.hpp:18
int DigitTime
digit time type. DigitTime < 0 past, DigitTime >= 0 future, DigitTime == 0 now.
Definition: TimeSeries.hpp:47
virtual std::ostream & print(std::ostream &os) const
print
Definition: TimeseriesExceptions.hpp:18
PredictionRangeException(DigitTime f, DigitTime t)
constructor
Definition: TimeseriesExceptions.hpp:14