Wyatt  1.0.1
NonexistentHardwareException.h
1 //
2 // Created by Tucker Haydon on 4/24/17.
3 //
4 
5 #pragma once
6 
10 class NonexistentHardwareException: public std::exception {
11 
12 public:
17  NonexistentHardwareException(Hardware hardware) : std::exception() {
18  this->hardware = hardware;
19  }
20 
25  virtual const char* what() const throw() {
26  std::string msg("Hardware does not exist. Address: ");
27  msg += (int)((this->hardware).address);
28  msg += "\nLength: ";
29  msg += (int)((this->hardware).messageLength);
30  return msg.c_str();
31  }
32 
33 private:
34  Hardware hardware;
35 };
virtual const char * what() const