change VBAP visual parameter name again :)
[ardour.git] / libs / pbd / enumwriter.cc
index 5263a886fbc21845f873a90d5c69cb59762d728c..6d911b2dea7c540198bf559ed603ed3f524b06ff 100644 (file)
@@ -73,6 +73,13 @@ EnumWriter::instance()
        return *_instance;
 }
 
+void
+EnumWriter::destroy ()
+{
+       delete _instance;
+       _instance = 0;
+}
+
 EnumWriter::EnumWriter ()
 {
 }
@@ -120,7 +127,7 @@ EnumWriter::write (string type, int value)
 
        if (x == registry.end()) {
                error << string_compose (_("EnumWriter: unknown enumeration type \"%1\""), type) << endmsg;
-               throw unknown_enumeration();
+               throw unknown_enumeration (type);
        }
 
        if (x->second.bitwise) {
@@ -137,7 +144,7 @@ EnumWriter::read (string type, string value)
 
        if (x == registry.end()) {
                error << string_compose (_("EnumWriter: unknown enumeration type \"%1\""), type) << endmsg;
-               throw unknown_enumeration();
+               throw unknown_enumeration (type);
        }
 
        if (x->second.bitwise) {
@@ -260,7 +267,7 @@ EnumWriter::read_bits (EnumRegistration& er, string str)
        } while (true);
 
        if (!found) {
-               throw unknown_enumeration();
+               throw unknown_enumeration (str);
        }
 
        return result;
@@ -309,7 +316,7 @@ EnumWriter::read_distinct (EnumRegistration& er, string str)
                }
        }
 
-       throw unknown_enumeration();
+       throw unknown_enumeration(str);
 }
 
 void