From 944e580825f0d9ce060b6dcdffe8990b6c2cca20 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 1 Mar 2012 03:31:28 -0600 Subject: Refactored the notion of "the current parsing context" --- src/xact.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/xact.cc') diff --git a/src/xact.cc b/src/xact.cc index 0fedb42a..0251edde 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -35,6 +35,7 @@ #include "post.h" #include "account.h" #include "journal.h" +#include "context.h" #include "pool.h" namespace ledger { @@ -608,7 +609,7 @@ namespace { } } -void auto_xact_t::extend_xact(xact_base_t& xact) +void auto_xact_t::extend_xact(xact_base_t& xact, parse_context_t& context) { posts_list initial_posts(xact.posts.begin(), xact.posts.end()); @@ -674,7 +675,8 @@ void auto_xact_t::extend_xact(xact_base_t& xact) throw_(parse_error, _("Transaction assertion failed: %1") << pair.first); else - warning_(_("Transaction check failed: %1") << pair.first); + context.warning(STR(_("Transaction check failed: %1") + << pair.first)); } } } -- cgit v1.2.3