Remove gflags dependency on osquery
[platform/core/security/vist.git] / src / osquery / registry / registry_factory.cpp
index c3227ba..03ba1eb 100644 (file)
 #include <sstream>
 
 #include <osquery/logger.h>
-#include <osquery/flags.h>
 #include <osquery/registry.h>
 #include <osquery/utils/conversions/split.h>
 #include <osquery/utils/json/json.h>
 
 namespace osquery {
 
-HIDDEN_FLAG(bool, registry_exceptions, false, "Allow plugin exceptions");
-
 RegistryFactory& RegistryFactory::get() {
   static RegistryFactory instance;
   return instance;
@@ -93,16 +90,10 @@ Status RegistryFactory::call(const std::string& registry_name,
   } catch (const std::exception& e) {
     LOG(ERROR) << registry_name << " registry " << item_name
                << " plugin caused exception: " << e.what();
-    if (FLAGS_registry_exceptions) {
-      throw;
-    }
     return Status(1, e.what());
   } catch (...) {
     LOG(ERROR) << registry_name << " registry " << item_name
                << " plugin caused unknown exception";
-    if (FLAGS_registry_exceptions) {
-      throw std::runtime_error(registry_name + ": " + item_name + " failed");
-    }
     return Status(2, "Unknown exception");
   }
 }