aboutsummaryrefslogtreecommitdiffstats
path: root/src/oids.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/oids.cpp')
-rw-r--r--src/oids.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/oids.cpp b/src/oids.cpp
index ee0cc6c0b..141b55707 100644
--- a/src/oids.cpp
+++ b/src/oids.cpp
@@ -40,9 +40,17 @@ std::string lookup(const OID& oid)
OID lookup(const std::string& name)
{
std::string value = global_config().get("str2oid", name);
- if(value == "")
+ if(value != "")
+ return OID(value);
+
+ try
+ {
return OID(name);
- return OID(value);
+ }
+ catch(Exception)
+ {
+ throw Lookup_Error("No object identifier found for " + name);
+ }
}
/*************************************************