Wyatt
1.0.1
Main Page
Classes
Files
File List
include
exceptions
MessageLengthException.h
1
//
2
// Created by Tucker Haydon on 4/25/17.
3
//
4
5
#pragma once
6
7
#include "Hardware.h"
8
#include <string>
9
13
class
MessageLengthException
:
public
std::exception {
14
15
public
:
20
MessageLengthException
(
Hardware
h) :
std
::exception() {
21
this->hardware = hardware;
22
}
23
28
virtual
const
char
*
what
()
const
throw() {
29
std::string msg(
"Message length does not match hardware description.\n"
);
30
msg +=
"Hardware address: "
;
31
msg += (int)hardware.address;
32
return
msg.c_str();
33
}
34
35
private
:
36
Hardware
hardware;
37
};
38
Hardware
Definition:
Hardware.h:11
std
MessageLengthException::MessageLengthException
MessageLengthException(Hardware h)
Definition:
MessageLengthException.h:20
MessageLengthException::what
virtual const char * what() const
Definition:
MessageLengthException.h:28
MessageLengthException
Definition:
MessageLengthException.h:13
Generated by
1.8.11