adevs
Main Page
Namespaces
Classes
Files
File List
include
adevs_exception.h
1
31
#ifndef _adevs_exception_h_
32
#define _adevs_exception_h_
33
#include <string>
34
#include <exception>
35
36
namespace
adevs
37
{
38
43
class
exception
:
public
std::exception
44
{
45
public
:
51
exception
(
const
char
* msg,
void
* model = NULL):
52
std::
exception
(),
53
msg(msg),
54
model(model)
55
{}
57
exception
(
const
adevs::exception
& src):
58
std::
exception
(src),
59
msg(src.msg),
60
model(src.model)
61
{}
63
const
char
*
what
()
const
throw()
64
{
65
return
msg.c_str();
66
}
68
void
*
who
()
const
{
return
model; }
70
~exception
() throw(){}
71
private
:
72
std::string msg;
73
void
* model;
74
};
75
80
class
method_not_supported_exception
:
81
public
exception
82
{
83
public
:
88
method_not_supported_exception
(
const
char
* method,
void
* model):
89
exception
((std::string(
"Unsupported method: "
)+std::string(method)).c_str(),
90
model)
91
{
92
}
93
};
94
99
class
lookahead_impossible_exception
:
100
public
exception
101
{
102
public
:
103
lookahead_impossible_exception
():
104
exception
(
"Lookahead cannot proceed"
)
105
{
106
}
107
};
108
109
}
// end of namespace
110
111
#endif
112
Generated by
1.8.3.1