CppUnit - The Unit Testing Library

CppUnit project page | FAQ

DynamicLibraryManagerException.h
Go to the documentation of this file.
1#ifndef CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGEREXCEPTION_H
2#define CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGEREXCEPTION_H
3
4#include <cppunit/Portability.h>
5
6#if !defined(CPPUNIT_NO_TESTPLUGIN)
7#include <stdexcept>
8#include <string>
9
10
11 CPPUNIT_NS_BEGIN
12
13
19 class DynamicLibraryManagerException : public std::runtime_error
20{
21public:
22 enum Cause
23 {
25 loadingFailed =0,
27 symbolNotFound
28 };
29
31 DynamicLibraryManagerException( const std::string &libraryName,
32 const std::string &errorDetail,
33 Cause cause );
34
35 ~DynamicLibraryManagerException() throw()
36 {
37 }
38
39 Cause getCause() const;
40
41 const char *what() const throw();
42
43private:
44 std::string m_message;
45 Cause m_cause;
46};
47
48
49 CPPUNIT_NS_END
50
51#endif // !defined(CPPUNIT_NO_TESTPLUGIN)
52
53#endif // CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGEREXCEPTION_H
Portability.h
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition Portability.h:106
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition Portability.h:105
DynamicLibraryManagerException
Exception thrown by DynamicLibraryManager when a failure occurs.
Definition DynamicLibraryManagerException.h:20
DynamicLibraryManagerException::getCause
Cause getCause() const
Definition DynamicLibraryManagerException.cpp:24
DynamicLibraryManagerException::what
const char * what() const
Definition DynamicLibraryManagerException.cpp:31
DynamicLibraryManagerException::Cause
Cause
Definition DynamicLibraryManagerException.h:23
DynamicLibraryManagerException::symbolNotFound
@ symbolNotFound
Symbol not found in the dynamic library.
Definition DynamicLibraryManagerException.h:27
DynamicLibraryManagerException::loadingFailed
@ loadingFailed
Failed to load the dynamic library.
Definition DynamicLibraryManagerException.h:25
DynamicLibraryManagerException::DynamicLibraryManagerException
DynamicLibraryManagerException(const std::string &libraryName, const std::string &errorDetail, Cause cause)
Failed to load the dynamic library or Symbol not found in the dynamic library.
Definition DynamicLibraryManagerException.cpp:7
DynamicLibraryManagerException::~DynamicLibraryManagerException
~DynamicLibraryManagerException()
Definition DynamicLibraryManagerException.h:35
DynamicLibraryManagerException::m_message
std::string m_message
Definition DynamicLibraryManagerException.h:44
DynamicLibraryManagerException::m_cause
Cause m_cause
Definition DynamicLibraryManagerException.h:45

| Send comments to: CppUnit Developers