Menu

[r4]: / trunk / cppunit / cppunit / Exception.h  Maximize  Restore  History

Download this file

46 lines (31 with data), 993 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef CPPUNIT_EXCEPTION_H
#define CPPUNIT_EXCEPTION_H
#include <exception>
#include <string>
namespace CppUnit {
/**
* Exception is an exception that serves
* descriptive strings through its what() method
*
*/
class Exception : public exception
{
public:
Exception (std::string message = "",
long lineNumber = UNKNOWNLINENUMBER,
std::string fileName = UNKNOWNFILENAME);
Exception (const Exception& other);
virtual ~Exception ();
Exception& operator= (const Exception& other);
const char *what() const throw ();
long lineNumber ();
std::string fileName ();
static const std::string UNKNOWNFILENAME;
static const int UNKNOWNLINENUMBER;
private:
std::string m_message;
long m_lineNumber;
std::string m_fileName;
};
} // namespace CppUnit
#endif // CPPUNIT_EXCEPTION_H
MongoDB Logo MongoDB