summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-01 03:31:28 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-01 03:31:28 -0600
commit944e580825f0d9ce060b6dcdffe8990b6c2cca20 (patch)
treee2651b0df622d9b8d3831f35743e7dbd31c16897 /src/xact.cc
parente2afc783db0dff1927b00dc506390353d9e3bbd2 (diff)
downloadfork-ledger-944e580825f0d9ce060b6dcdffe8990b6c2cca20.tar.gz
fork-ledger-944e580825f0d9ce060b6dcdffe8990b6c2cca20.tar.bz2
fork-ledger-944e580825f0d9ce060b6dcdffe8990b6c2cca20.zip
Refactored the notion of "the current parsing context"
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc6
1 files changed, 4 insertions, 2 deletions
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));
}
}
}