Wyatt
1.0.1
Main Page
Classes
Files
File List
include
exceptions
DuplicateHardwareException.h
1
//
2
// Created by Tucker Haydon on 4/24/17.
3
//
4
5
#pragma once
6
10
class
DuplicateHardwareException
:
public
std::exception {
11
12
public
:
17
DuplicateHardwareException
(
Hardware
hardware) :
std
::exception() {
18
this->hardware = hardware;
19
}
20
25
virtual
const
char
*
what
()
const
throw() {
26
std::string msg(
"Hardware has already been added. 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
};
Hardware
Definition:
Hardware.h:11
std
DuplicateHardwareException::DuplicateHardwareException
DuplicateHardwareException(Hardware hardware)
Definition:
DuplicateHardwareException.h:17
DuplicateHardwareException
Definition:
DuplicateHardwareException.h:10
DuplicateHardwareException::what
virtual const char * what() const
Definition:
DuplicateHardwareException.h:25
Generated by
1.8.11