~ubuntu-branches/ubuntu/wily/psi/wily

« back to all changes in this revision

Viewing changes to third-party/cppunit/cppunit/src/cppunit/DynamicLibraryManagerException.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <cppunit/plugin/DynamicLibraryManagerException.h>
2
 
 
3
 
#if !defined(CPPUNIT_NO_TESTPLUGIN)
4
 
 
5
 
CPPUNIT_NS_BEGIN
6
 
 
7
 
 
8
 
DynamicLibraryManagerException::DynamicLibraryManagerException( 
9
 
                                         const std::string &libraryName,
10
 
                                         const std::string &errorDetail,
11
 
                                         Cause cause )
12
 
    : std::runtime_error( "" ),
13
 
      m_cause( cause )
14
 
{
15
 
  if ( cause == loadingFailed )
16
 
    m_message = "Failed to load dynamic library: " + libraryName + "\n" + 
17
 
                errorDetail;
18
 
  else
19
 
    m_message = "Symbol [" + errorDetail + "] not found in dynamic libary:" + 
20
 
                libraryName;
21
 
}
22
 
 
23
 
 
24
 
DynamicLibraryManagerException::Cause 
25
 
DynamicLibraryManagerException::getCause() const
26
 
{
27
 
  return m_cause;
28
 
}
29
 
 
30
 
 
31
 
const char *
32
 
DynamicLibraryManagerException::what() const throw()
33
 
{
34
 
  return m_message.c_str();
35
 
}
36
 
 
37
 
 
38
 
CPPUNIT_NS_END
39
 
 
40
 
 
41
 
#endif // !defined(CPPUNIT_NO_TESTPLUGIN)