~ubuntu-branches/ubuntu/karmic/psi/karmic

« 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: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

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)