summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/factory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/factory.cpp b/lib/factory.cpp
index 35b1b24..e07a2f2 100644
--- a/lib/factory.cpp
+++ b/lib/factory.cpp
@@ -5,6 +5,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
#include <stdexcept>
+#include <iostream>
#include <map>
using namespace gras;
@@ -40,7 +41,7 @@ void Factory::_register_make(const std::string &name, void *entry)
boost::mutex::scoped_lock l(mutex);
if (get_factory_registry().count(name) != 0)
{
- throw std::invalid_argument("Factory - function already registered for name: " + name);
+ std::cerr << "Warning: Factory - function already registered for name: " + name << std::endl;
}
get_factory_registry()[name].reset(reinterpret_cast<FactoryRegistryEntry *>(entry));
}