[Orxonox-commit 924] r5647 - code/branches/libraries/src/core

landauf at orxonox.net landauf at orxonox.net
Fri Aug 14 02:57:22 CEST 2009


Author: landauf
Date: 2009-08-14 02:57:22 +0200 (Fri, 14 Aug 2009)
New Revision: 5647

Modified:
   code/branches/libraries/src/core/Core.cc
Log:
protected the plugin loader from single-plugin-exceptions (for example caused by invalid .plugin files)

Modified: code/branches/libraries/src/core/Core.cc
===================================================================
--- code/branches/libraries/src/core/Core.cc	2009-08-13 20:54:59 UTC (rev 5646)
+++ code/branches/libraries/src/core/Core.cc	2009-08-14 00:57:22 UTC (rev 5647)
@@ -298,7 +298,18 @@
                         std::string library = filename.substr(0, filename.size() - pluginextensionlength);
                         boost::filesystem::path librarypath = searchpath / library;
 
-                        DynLibManager::getInstance().load(librarypath.string());
+                        try
+                        {
+                            DynLibManager::getInstance().load(librarypath.string());
+                        }
+                        catch (const std::exception& e)
+                        {
+                            COUT(1) << "Couldn't load plugin \"" << librarypath.string() << "\": " << e.what() << std::endl;
+                        }
+                        catch (...)
+                        {
+                            COUT(1) << "Couldn't load plugin \"" << librarypath.string() << "\"" << std::endl;
+                        }
                     }
                 }
 




More information about the Orxonox-commit mailing list