summaryrefslogtreecommitdiff
path: root/src/commodity.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-08 13:36:21 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-08 13:36:21 -0500
commit55c7792c9329f97dd19fc5aeca466cb2de4fbf9c (patch)
treeb820b7c4b064e5d430439839768aa5b855ce3a4a /src/commodity.cc
parent3f00f8362c2fdfae1dbb6517bc29c75e308bc4f0 (diff)
parent60059750061fe59c83adc869f36335a083955608 (diff)
downloadledger-55c7792c9329f97dd19fc5aeca466cb2de4fbf9c.tar.gz
ledger-55c7792c9329f97dd19fc5aeca466cb2de4fbf9c.tar.bz2
ledger-55c7792c9329f97dd19fc5aeca466cb2de4fbf9c.zip
Merge branch 'next'
Diffstat (limited to 'src/commodity.cc')
-rw-r--r--src/commodity.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commodity.cc b/src/commodity.cc
index a0827e7a..0d6c11c6 100644
--- a/src/commodity.cc
+++ b/src/commodity.cc
@@ -512,7 +512,7 @@ void commodity_t::parse_symbol(std::istream& in, string& symbol)
for (std::size_t i = 0; i < bytes; i++) {
in.get(c);
if (in.bad() || in.eof())
- break;
+ throw_(amount_error, _("Invalid UTF-8 encoding for commodity name"));
*_p++ = c;
}
}
@@ -526,7 +526,7 @@ void commodity_t::parse_symbol(std::istream& in, string& symbol)
if (c == '\\') {
in.get(c);
if (in.eof())
- break;
+ throw_(amount_error, _("Backslash at end of commodity name"));
}
*_p++ = c;
}