StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StHbtMaker
Infrastructure
StExceptions.hh
1
#include "
Stiostream.h
"
2
#include <string>
3
#include <typeinfo>
4
5
#ifndef StExceptions_hh
6
#define StExceptions_hh
7
8
class
StException
{
9
private
:
10
std::string mName;
11
std::string mMessage;
12
public
:
13
StException
(
const
char
* c=
"unknown"
,
const
char
* m=
""
) : mName(c),mMessage(m) {
/* no-op */
}
14
virtual
~
StException
() {}
15
virtual
std::string name() {
return
mName;}
16
virtual
std::string message() {
return
mMessage; }
17
virtual
void
print() { cout <<
"*** StException * "
<< name() <<
" *** "
<< message() << endl; }
18
};
19
20
class
StExceptionNullPointer
:
public
StException
{
21
private
:
22
public
:
23
StExceptionNullPointer
(
const
char
* message=
""
) :
StException
(
"nullPointer"
,message) {
/* -no-op */
}
24
virtual
~
StExceptionNullPointer
() {}
25
};
26
27
class
StExceptionBadFlag
:
public
StException
{
28
private
:
29
public
:
30
StExceptionBadFlag
(
const
char
* message=
""
) :
StException
(
"badFlag"
,message) {
/* no-op */
}
31
virtual
~
StExceptionBadFlag
() {}
32
};
33
34
class
StExceptionBadValue
:
public
StException
{
35
private
:
36
float
mValue;
37
public
:
38
StExceptionBadValue
(
const
char
* message=
""
,
float
value=0) :
StException
(
"badValue"
,message) , mValue(value) {
/* no-op */
}
39
virtual
~
StExceptionBadValue
() {}
40
virtual
void
print() { cout <<
"*** StException * "
<< name() <<
" *** "
<< message() <<
" "
<< mValue << endl; }
41
};
42
43
class
StExceptionEOF
:
public
StException
{
44
private
:
45
public
:
46
StExceptionEOF
(
const
char
* message=
""
) :
StException
(
"end of file"
,message) {
/* no-op */
}
47
virtual
~
StExceptionEOF
() {}
48
};
49
50
#endif
51
StExceptionEOF
Definition:
StExceptions.hh:43
StException
Definition:
StExceptions.hh:8
StExceptionBadFlag
Definition:
StExceptions.hh:27
StExceptionBadValue
Definition:
StExceptions.hh:34
Stiostream.h
StExceptionNullPointer
Definition:
StExceptions.hh:20
Generated by
1.8.5