1#ifndef CPPUNIT_EXCEPTION_H
2#define CPPUNIT_EXCEPTION_H
29#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
35 std::string fileName );
50 const char *
what()
const throw();
61#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
63 long lineNumber()
const;
66 std::string fileName()
const;
68 static const std::string UNKNOWNFILENAME;
69 static const long UNKNOWNLINENUMBER;
#define CPPUNIT_API
Definition CppUnitApi.h:27
#define CPPUNIT_NS_END
Definition Portability.h:106
#define CPPUNIT_NS_BEGIN
Definition Portability.h:105
virtual Exception * clone() const
Clones the exception.
Definition Exception.cpp:120
std::exception SuperClass
Definition Exception.h:78
std::string m_whatMessage
Definition Exception.h:82
const char * what() const
Returns descriptive message.
Definition Exception.cpp:71
Message message() const
Message related to the exception.
Definition Exception.cpp:88
Exception(const Message &message=Message(), const SourceLine &sourceLine=SourceLine())
Constructs the exception with the specified message and source location.
Definition Exception.cpp:28
void setMessage(const Message &message)
Set the message.
Definition Exception.cpp:95
Message m_message
Definition Exception.h:80
SourceLine m_sourceLine
Definition Exception.h:81
SourceLine sourceLine() const
Location where the error occured.
Definition Exception.cpp:81
Message associated to an Exception.A message is composed of two items:
Definition Message.h:35
Represents a source line location.
Definition SourceLine.h:31