diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-26 17:17:12 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-26 17:17:12 -0400 |
commit | 8999607408c87624f3247a256974e6c341dd3611 (patch) | |
tree | b463f7b475a1f9e6a6dbdf2437510de19028f47c /src | |
parent | feff681f4464eb9b538bde613afaf3b03c7c223a (diff) | |
download | ledger-8999607408c87624f3247a256974e6c341dd3611.tar.gz ledger-8999607408c87624f3247a256974e6c341dd3611.tar.bz2 ledger-8999607408c87624f3247a256974e6c341dd3611.zip |
If a pricing entry fails to parse, give an error
Diffstat (limited to 'src')
-rw-r--r-- | src/textual.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/textual.cc b/src/textual.cc index 967e2f1b..f7b71429 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -461,7 +461,8 @@ void instance_t::price_xact_directive(char * line) { optional<price_point_t> point = amount_t::current_pool->parse_price_directive(skip_ws(line + 1)); - assert(point); + if (! point) + throw parse_error(_("Pricing entry failed to parse")); } void instance_t::nomarket_directive(char * line) |