Wyatt
1.0.1
Main Page
Classes
Files
File List
include
exceptions
MismatchedMessageException.h
1
//
2
// Created by Tucker Haydon on 4/26/17.
3
//
4
5
#pragma once
6
7
#include "messages/IMessage.h"
8
#include <typeinfo>
9
13
class
MismatchedMessageException
:
public
std::exception {
14
15
public
:
20
MismatchedMessageException
(
IMessage
* msg):
std
::exception() {
21
this->msg = msg;
22
}
23
28
virtual
const
char
*
what
()
const
throw() {
29
std::string msg(
"Message is of wrong type: "
);
30
msg +=
typeid
(this->msg).name();
31
return
msg.c_str();
32
}
33
34
private
:
35
IMessage
* msg;
36
};
MismatchedMessageException
Definition:
MismatchedMessageException.h:13
MismatchedMessageException::what
virtual const char * what() const
Definition:
MismatchedMessageException.h:28
std
IMessage
Definition:
IMessage.h:10
MismatchedMessageException::MismatchedMessageException
MismatchedMessageException(IMessage *msg)
Definition:
MismatchedMessageException.h:20
Generated by
1.8.11