ATLAS Offline Software
Loading...
Searching...
No Matches
ExceptionMsg.cxx
Go to the documentation of this file.
1//
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at
4// http://www.boost.org/LICENSE_1_0.txt)
5
6// Please feel free to contact me (krumnack@iastate.edu) for bug
7// reports, feature suggestions, praise and complaints.
8
9
10//
11// includes
12//
13
14//protect
16
17#include <memory>
19
20//
21// method implementations
22//
23
24namespace RCU
25{
26 void ExceptionMsg ::
27 testInvariant () const
28 {
29 //RCU_INVARIANT (this != 0);
30 RCU_INVARIANT (!m_message.empty());
31 }
32
33
34
35 ExceptionMsg ::
36 ExceptionMsg (const char *const /*val_file*/, const unsigned /*val_line*/,
37 const std::string& val_message)
38 : m_message (val_message)
39 {
40 RCU_NEW_INVARIANT (this);
41 }
42
43
44
45 ExceptionMsg ::
46 ~ExceptionMsg () throw ()
47 {
49 }
50
51
52
53 const char *ExceptionMsg ::
54 what () const throw ()
55 {
56 RCU_READ_INVARIANT (this);
57 return m_message.c_str();
58 }
59}
#define RCU_INVARIANT(x)
Definition Assert.h:201
#define RCU_DESTROY_INVARIANT(x)
Definition Assert.h:235
#define RCU_NEW_INVARIANT(x)
Definition Assert.h:233
#define RCU_READ_INVARIANT(x)
Definition Assert.h:229
std::string m_message
description: the actual message
This module defines a variety of assert style macros.
Definition Assert.cxx:26