diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-27 04:09:08 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-27 04:10:16 -0600 |
commit | 1d89093059b6a017fe882d3e3415503938b126ee (patch) | |
tree | 37333c99cb9e7df934476ef3ab457cdac05eddb1 | |
parent | ee530f94338ab8c3130a1e8b52dfa481bdfe596c (diff) | |
download | fork-ledger-1d89093059b6a017fe882d3e3415503938b126ee.tar.gz fork-ledger-1d89093059b6a017fe882d3e3415503938b126ee.tar.bz2 fork-ledger-1d89093059b6a017fe882d3e3415503938b126ee.zip |
Output some line numbers with warnings
-rw-r--r-- | src/textual.cc | 6 | ||||
-rw-r--r-- | test/baseline/feat-check.test | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/textual.cc b/src/textual.cc index 8a1968fc..90dab52d 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -993,7 +993,8 @@ void instance_t::check_directive(char * line) { expr_t expr(line); if (! expr.calc(context.scope).to_boolean()) - warning_(_("Check failed: %1") << line); + warning_(_("%1Check failed: %2") + << file_context(pathname, linenum) << line); } void instance_t::comment_directive(char * line) @@ -1575,7 +1576,8 @@ xact_t * instance_t::parse_xact(char * line, if (c == 'a') { throw_(parse_error, _("Transaction assertion failed: %1") << p); } else { - warning_(_("Transaction check failed: %1") << p); + warning_(_("%1Transaction check failed: %2") + << file_context(pathname, linenum) << p); } } } diff --git a/test/baseline/feat-check.test b/test/baseline/feat-check.test index a5f0c8ad..9a2e72df 100644 --- a/test/baseline/feat-check.test +++ b/test/baseline/feat-check.test @@ -14,5 +14,5 @@ test bal 0 __ERROR__ Warning: Transaction check failed: (account =~ /Foo/) -Warning: Check failed: account("Assets:Checking").all(account =~ /Expense/) +Warning: "$sourcepath/test/baseline/feat-check.test", line 8: Check failed: account("Assets:Checking").all(account =~ /Expense/) end test |