From 02bd9d29cf7c899b5be4575f00f967e277aece99 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 8 Feb 2009 20:05:56 -0400 Subject: Improved an error message that was trying to show transaction context. --- src/item.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/item.cc') 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 << "-" -- cgit v1.2.3