options: catch execption by reference

This commit is contained in:
Danny Robson 2015-01-10 20:07:25 +11:00
parent 7045abb5ad
commit ad53b9f2de

View File

@ -275,7 +275,7 @@ bytesoption::execute (const std::string& data) {
specified = type_from_character (data[cursor]);
// If the character is a digit, it just means the user skipped the
// size specifier, which is ok.
} catch (domain_error x) {
} catch (domain_error &x) {
if (!isdigit (data[cursor]))
throw invalid_argument ("Not a size");