summaryrefslogtreecommitdiff
path: root/walk.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-23 06:34:27 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-23 06:34:27 -0400
commitc57a2e74b877eeca2361a5e8412ae9866541634c (patch)
treedf7f87bdfd71d5d004c0fe1f88cdc0f1ade934c6 /walk.cc
parentb4b20a6ca70fd016df05ee137e08bfe97e2e27cf (diff)
downloadfork-ledger-c57a2e74b877eeca2361a5e8412ae9866541634c.tar.gz
fork-ledger-c57a2e74b877eeca2361a5e8412ae9866541634c.tar.bz2
fork-ledger-c57a2e74b877eeca2361a5e8412ae9866541634c.zip
shored up error checking of value expressions
Diffstat (limited to 'walk.cc')
-rw-r--r--walk.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/walk.cc b/walk.cc
index 844099a2..154014e8 100644
--- a/walk.cc
+++ b/walk.cc
@@ -361,6 +361,8 @@ void walk_accounts(account_t& account,
{
if (! sort_string.empty()) {
std::auto_ptr<value_expr_t> sort_order(parse_value_expr(sort_string));
+ if (! sort_order.get())
+ throw error(std::string("Sort string failed to parse: " + sort_string));
walk_accounts(account, handler, sort_order.get());
} else {
walk_accounts(account, handler);