diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-19 22:29:36 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-19 22:29:36 -0400 |
commit | 72c09cc0bf6247a36c9a2dae6109ca4583ff2f6e (patch) | |
tree | e762c42ac90edfd5f725d2607c9c699eb7be572e /src/op.cc | |
parent | efc923acb4e902c8bb4cd65a01b85927dfd568b6 (diff) | |
download | fork-ledger-72c09cc0bf6247a36c9a2dae6109ca4583ff2f6e.tar.gz fork-ledger-72c09cc0bf6247a36c9a2dae6109ca4583ff2f6e.tar.bz2 fork-ledger-72c09cc0bf6247a36c9a2dae6109ca4583ff2f6e.zip |
Generate a better error if a function operand is invalid.
Diffstat (limited to 'src/op.cc')
-rw-r--r-- | src/op.cc | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -93,12 +93,11 @@ value_t expr_t::op_t::calc(scope_t& scope) call_args.set_args(right()->calc(scope)); ptr_op_t func = left(); - string name; assert(func->kind == IDENT); func = func->left(); - if (func->kind != FUNCTION) + if (! func || func->kind != FUNCTION) throw_(calc_error, "Calling non-function"); return func->as_function()(call_args); |