ATLAS Offline Software
PhysicsAnalysis
D3PDTools
RootCoreUtils
RootCoreUtils
ExceptionMsg.h
Go to the documentation of this file.
1
#ifndef ROOT_CORE_UTILS__EXCEPTION_MSG_H
2
#define ROOT_CORE_UTILS__EXCEPTION_MSG_H
3
4
//
5
// Distributed under the Boost Software License, Version 1.0.
6
// (See accompanying file LICENSE_1_0.txt or copy at
7
// http://www.boost.org/LICENSE_1_0.txt)
8
9
// Please feel free to contact me (krumnack@iastate.edu) for bug
10
// reports, feature suggestions, praise and complaints.
11
12
13
// This module defines an exception that contains nothing more than an
14
// error message. The interface provided in this module is intended
15
// for the general user. The module is considered to be in the
16
// pre-alpha stage.
17
18
19
20
//protect
21
#include <
RootCoreUtils/Global.h
>
22
23
#include <exception>
24
#include <string>
25
26
namespace
RCU
27
{
28
class
ExceptionMsg
:
public
std::exception
29
{
30
//
31
// public interface
32
//
33
34
// effects: test the invariant of this object
35
// guarantee: no-fail
36
public
:
37
void
testInvariant
()
const
;
38
39
40
// effects: create an exception with the given message
41
// guarantee: strong
42
// failures: out of memory II
43
// requires: val_file != 0
44
// requires: val_line != 0
45
// requires: !val_message.empty()
46
public
:
47
ExceptionMsg
(
const
char
*
const
val_file,
const
unsigned
val_line,
48
const
std::string& val_message);
49
50
51
// effects: destroy this object
52
// guarantee: no-fail
53
public
:
54
virtual
~ExceptionMsg
()
throw
();
55
56
57
58
//
59
// interface inherited from std::exception
60
//
61
62
// returns: the message associated with this exception
63
// guarantee: no-fail
64
public
:
65
virtual
const
char
*
what
()
const
throw
();
66
67
68
69
//
70
// private interface
71
//
72
74
private
:
75
std::string
m_message
;
76
};
77
}
78
79
#endif
Global.h
RCU
This module defines a variety of assert style macros.
Definition:
Assert.cxx:26
RCU::ExceptionMsg::what
virtual const char * what() const
Definition:
ExceptionMsg.cxx:54
RCU::ExceptionMsg::ExceptionMsg
ExceptionMsg(const char *const val_file, const unsigned val_line, const std::string &val_message)
Definition:
ExceptionMsg.cxx:36
RCU::ExceptionMsg
Definition:
ExceptionMsg.h:29
calibdata.exception
exception
Definition:
calibdata.py:496
RCU::ExceptionMsg::~ExceptionMsg
virtual ~ExceptionMsg()
Definition:
ExceptionMsg.cxx:46
RCU::ExceptionMsg::m_message
std::string m_message
description: the actual message
Definition:
ExceptionMsg.h:75
RCU::ExceptionMsg::testInvariant
void testInvariant() const
Definition:
ExceptionMsg.cxx:27
Generated on Thu Nov 7 2024 21:15:06 for ATLAS Offline Software by
1.8.18