summaryrefslogtreecommitdiff
path: root/src/op.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-02 00:24:26 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-02 00:24:26 -0400
commit9540406af15d522d15c94cc3d63c77b7da7e1423 (patch)
tree6dd912aac2adb018c16a8b506bc0e18eb8444caa /src/op.cc
parentef3943c60498ab0fd4de1f1735109b0d103c167a (diff)
downloadfork-ledger-9540406af15d522d15c94cc3d63c77b7da7e1423.tar.gz
fork-ledger-9540406af15d522d15c94cc3d63c77b7da7e1423.tar.bz2
fork-ledger-9540406af15d522d15c94cc3d63c77b7da7e1423.zip
Simplified error context handling.
Diffstat (limited to 'src/op.cc')
-rw-r--r--src/op.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/op.cc b/src/op.cc
index caf5af11..588adc4b 100644
--- a/src/op.cc
+++ b/src/op.cc
@@ -86,7 +86,7 @@ value_t expr_t::op_t::calc(scope_t& scope)
catch (const std::exception& err) {
if (context_op_ptr) {
add_error_context("While evaluating value expression:");
- add_error_context(expr_context(this, context_op_ptr));
+ add_error_context(op_context(this, context_op_ptr));
}
throw;
}
@@ -574,7 +574,7 @@ void expr_t::op_t::write(std::ostream& out) const
}
}
-string expr_context(const expr_t::ptr_op_t op, const expr_t::ptr_op_t goal)
+string op_context(const expr_t::ptr_op_t op, const expr_t::ptr_op_t goal)
{
ostream_pos_type start_pos, end_pos;
expr_t::op_t::context_t context(op, goal, &start_pos, &end_pos);
@@ -588,7 +588,6 @@ string expr_context(const expr_t::ptr_op_t op, const expr_t::ptr_op_t goal)
else
buf << " ";
}
- buf << '\n';
}
return buf.str();
}