Monarch
v3.8.2
Project 8 Data File Format Library
Monarch2
M2Exception.hh
Go to the documentation of this file.
1
#ifndef M2EXCEPTION_HH_
2
#define M2EXCEPTION_HH_
3
4
#include <exception>
5
#include <sstream>
6
7
namespace
monarch2
8
{
9
10
class
M2Exception
:
public
std::exception
11
{
12
public
:
13
M2Exception
();
14
M2Exception
(
const
M2Exception
& aCopy );
15
virtual
~M2Exception
()
throw
();
16
17
public
:
18
virtual
const
char
*
what
()
const
throw
();
19
20
template
<
class
XType >
21
M2Exception
&
operator<<
(
const
XType& aReference )
22
{
23
std::stringstream tStream;
24
tStream << aReference;
25
fMessage
+= tStream.str();
26
return
*
this
;
27
}
28
29
private
:
30
std::string
fMessage
;
31
};
32
33
}
34
35
#endif
monarch2::M2Exception
Definition:
M2Exception.hh:10
monarch2::M2Exception::~M2Exception
virtual ~M2Exception()
Definition:
M2Exception.cc:16
monarch2::M2Exception::what
virtual const char * what() const
Definition:
M2Exception.cc:20
monarch2::M2Exception::operator<<
M2Exception & operator<<(const XType &aReference)
Definition:
M2Exception.hh:21
monarch2
Definition:
M2Exception.cc:3
monarch2::M2Exception::fMessage
std::string fMessage
Definition:
M2Exception.hh:30
monarch2::M2Exception::M2Exception
M2Exception()
Definition:
M2Exception.cc:6
Generated by
1.8.13