summaryrefslogtreecommitdiff
path: root/src/item.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-08 20:05:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-08 20:05:56 -0400
commit02bd9d29cf7c899b5be4575f00f967e277aece99 (patch)
treef976a7ea86b4792222cf2313affab7762f2cf51b /src/item.cc
parent4f5799c216df4a1b57bc5c59f286a685b0f77448 (diff)
downloadfork-ledger-02bd9d29cf7c899b5be4575f00f967e277aece99.tar.gz
fork-ledger-02bd9d29cf7c899b5be4575f00f967e277aece99.tar.bz2
fork-ledger-02bd9d29cf7c899b5be4575f00f967e277aece99.zip
Improved an error message that was trying to show transaction context.
Diffstat (limited to 'src/item.cc')
-rw-r--r--src/item.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/item.cc b/src/item.cc
index 8bd2471b..cb69909f 100644
--- a/src/item.cc
+++ b/src/item.cc
@@ -328,7 +328,7 @@ bool item_t::valid() const
return true;
}
-string item_context(const item_t& item)
+string item_context(const item_t& item, const string& desc)
{
std::size_t len = item.end_pos - item.beg_pos;
assert(len > 0);
@@ -342,8 +342,7 @@ string item_context(const item_t& item)
std::ostringstream out;
- out << "While balancing item from \"" << item.pathname.string()
- << "\"";
+ out << desc << " from \"" << item.pathname.string() << "\"";
if (item.beg_line != item.end_line)
out << ", lines " << item.beg_line << "-"