#ifndef __DELTA_EXCEPTION_H_INCLUDE
#define __DELTA_EXCEPTION_H_INCLUDE
#include <iostream>
#include <exception>
using namespace std;

class CompareException : public std::exception {
public:
  const char * what () const throw () {
    return "The first Address value must be less than the second Address value";
  }
};

class AddressIsNotExistException : public std::exception {
  int Address;
public:
  AddressIsNotExistException(int Address) {
    this->Address = Address;
  }

  const char * what () const throw () {
    std::stringstream msg;
    msg << "The Addtess 0x" << Address << " is not Exist";
    return msg.str().c_str();
  }
};

class OutRangeException : public std::exception {
  int Maximum;
public:
  OutRangeException(int Maximum) {
    this->Maximum = Maximum;
  }

  const char * what () const throw () {
    std::stringstream msg;
    msg << "Starting address must be 0 - 65535; quantity must be 0 - " << Maximum;
    return msg.str().c_str();
  }
};

class Exception : public std::exception {
  int Maximum;
public:
  std::string msg;
  Exception(std::string msg) {
    this->msg = msg;
  }
  const char * what () const throw () {
    return msg.c_str();
  }
};
#endif
