Make EnumWriter exceptions a bit more informative.

git-svn-id: svn://localhost/ardour2/branches/3.0@12758 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-06-18 18:28:19 +00:00
parent 49fec4f430
commit 24b418598a
2 changed files with 19 additions and 6 deletions

View file

@ -127,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) {
@ -144,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) {
@ -267,7 +267,7 @@ EnumWriter::read_bits (EnumRegistration& er, string str)
} while (true);
if (!found) {
throw unknown_enumeration();
throw unknown_enumeration (str);
}
return result;
@ -316,7 +316,7 @@ EnumWriter::read_distinct (EnumRegistration& er, string str)
}
}
throw unknown_enumeration();
throw unknown_enumeration(str);
}
void