diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-08-17 20:21:05 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-08-17 20:28:49 +0300 |
commit | d3721e50005a909b55e153372809019ef1e893a6 (patch) | |
tree | f5cc8fb5284114698425e62728367377f5637542 /sal/cppunittester | |
parent | Use dlerror() (diff) | |
download | core-d3721e50005a909b55e153372809019ef1e893a6.tar.gz core-d3721e50005a909b55e153372809019ef1e893a6.zip |
Handle CppUnit::DynamicLibraryManagerException
Change-Id: I81f9b133ffb03c225b276639f60ad5e7f38ec1ef
Diffstat (limited to 'sal/cppunittester')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index a5fe7007d4ad..346373f03584 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -53,6 +53,7 @@ #include "cppunit/TestRunner.h" #include "cppunit/extensions/TestFactoryRegistry.h" #include "cppunit/plugin/PlugInManager.h" +#include "cppunit/plugin/DynamicLibraryManagerException.h" #include "cppunit/portability/Stream.h" #include "boost/noncopyable.hpp" @@ -137,7 +138,12 @@ public: // we statically link to the app executable. #else CppUnit::PlugInManager manager; - manager.load(testlib, args); + try { + manager.load(testlib, args); + } catch (const CppUnit::DynamicLibraryManagerException &e) { + fprintf(stderr, "%s\n", e.what()); + return false; + } #endif CppUnit::TestRunner runner; runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); |