From 41e4aea7595d3b9009bece4902d9efdb8ba00e6c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 6 Jun 2010 06:03:56 -0400 Subject: Made lookup of an account's "cost" a calc error --- src/account.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/account.cc') diff --git a/src/account.cc b/src/account.cc index e577c48e..37ff83f3 100644 --- a/src/account.cc +++ b/src/account.cc @@ -205,6 +205,10 @@ namespace { value_t get_count(account_t& account) { return long(account.family_details().posts_count); } + value_t get_cost(account_t&) { + throw_(calc_error, _("An account does not have a 'cost' value")); + return false; + } value_t get_depth(account_t& account) { return long(account.depth); @@ -311,6 +315,8 @@ expr_t::ptr_op_t account_t::lookup(const symbol_t::kind_t kind, case 'c': if (name == "count") return WRAP_FUNCTOR(get_wrapper<&get_count>); + else if (name == "cost") + return WRAP_FUNCTOR(get_wrapper<&get_cost>); break; case 'd': -- cgit v1.2.3