diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-05-13 18:08:34 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-05-13 18:08:34 -0400 |
commit | 60d9c2bc1d8095f06c13fbf1bcce2d5c587a3a64 (patch) | |
tree | f75bf04c8e97cdfb5dc675e5478b4ea8113fd4b1 | |
parent | c411792edbe359d5653a2ad5de6b5ea4a40227c2 (diff) | |
download | fork-ledger-60d9c2bc1d8095f06c13fbf1bcce2d5c587a3a64.tar.gz fork-ledger-60d9c2bc1d8095f06c13fbf1bcce2d5c587a3a64.tar.bz2 fork-ledger-60d9c2bc1d8095f06c13fbf1bcce2d5c587a3a64.zip |
Remove trailing whitespace from error messages
Fix for bug #867
-rw-r--r-- | src/context.h | 4 | ||||
-rw-r--r-- | src/convert.cc | 2 | ||||
-rw-r--r-- | src/error.cc | 2 | ||||
-rw-r--r-- | test/baseline/cmd-source.test | 14 | ||||
-rw-r--r-- | test/baseline/dir-alias-fail.test | 2 | ||||
-rw-r--r-- | test/baseline/dir-commodity.test | 2 | ||||
-rw-r--r-- | test/baseline/opt-pedantic.test | 2 | ||||
-rw-r--r-- | test/regress/15A80F68.test | 2 | ||||
-rw-r--r-- | test/regress/1A546C4D.test | 2 | ||||
-rw-r--r-- | test/regress/2E3496BD.test | 2 | ||||
-rw-r--r-- | test/regress/5D92A5EB.test | 2 | ||||
-rw-r--r-- | test/regress/6188B0EC.test | 2 | ||||
-rw-r--r-- | test/regress/8EAF77C0.test | 2 | ||||
-rw-r--r-- | test/regress/BF3C1F82-2.test | 4 | ||||
-rw-r--r-- | test/regress/BF3C1F82.test | 4 | ||||
-rw-r--r-- | test/regress/D51BFF74.test | 2 | ||||
-rw-r--r-- | test/regress/D9C8EB08.test | 2 | ||||
-rw-r--r-- | test/regress/DDB54BB8.test | 2 | ||||
-rw-r--r-- | test/regress/error-in-include.test | 4 |
19 files changed, 29 insertions, 29 deletions
diff --git a/src/context.h b/src/context.h index 9f5bfe8f..27b733a1 100644 --- a/src/context.h +++ b/src/context.h @@ -101,10 +101,10 @@ public: } void warning(const string& what) const { - warning_func(location() + what); + warning_func(location() + " " + what); } void warning(const boost::format& what) const { - warning_func(location() + string(what.str())); + warning_func(location() + " " + string(what.str())); } }; diff --git a/src/convert.cc b/src/convert.cc index 2fcec38e..816271f2 100644 --- a/src/convert.cc +++ b/src/convert.cc @@ -86,7 +86,7 @@ value_t convert_command(call_scope_t& args) if (entry != journal.checksum_map.end()) { INFO(file_context(reader.get_pathname(), reader.get_linenum()) - << "Ignoring known UUID " << ref); + << " " << "Ignoring known UUID " << ref); checked_delete(xact); // ignore it continue; } diff --git a/src/error.cc b/src/error.cc index 035c5f19..830dacb0 100644 --- a/src/error.cc +++ b/src/error.cc @@ -49,7 +49,7 @@ string error_context() string file_context(const path& file, const std::size_t line) { std::ostringstream buf; - buf << '"' << file.string() << "\", line " << line << ": "; + buf << '"' << file.string() << "\", line " << line << ":"; return buf.str(); } diff --git a/test/baseline/cmd-source.test b/test/baseline/cmd-source.test index 95a10924..6d12719c 100644 --- a/test/baseline/cmd-source.test +++ b/test/baseline/cmd-source.test @@ -28,29 +28,29 @@ test source -> 7 __ERROR__ -While parsing file "$FILE", line 1: +While parsing file "$FILE", line 1: While parsing periodic transaction: > ~ xxx Error: Unexpected date period token 'xxx' -While parsing file "$FILE", line 6: +While parsing file "$FILE", line 6: Error: Only one posting with null amount allowed per transaction -While parsing file "$FILE", line 11: +While parsing file "$FILE", line 11: Error: Only one posting with null amount allowed per transaction -While parsing file "$FILE", line 13: +While parsing file "$FILE", line 13: While parsing transaction: > 2012/03/xx Error: Invalid date: 2012/03/xx -While parsing file "$FILE", line 18: +While parsing file "$FILE", line 18: While parsing posting: G AAA ^^^ Error: No quantity specified for amount -While parsing file "$FILE", line 22: +While parsing file "$FILE", line 22: While parsing posting: I 1,00.00 EUR ^^^^^^^^^^^ Error: Incorrect use of thousand-mark comma -While parsing file "$FILE", line 27: +While parsing file "$FILE", line 27: While balancing transaction from "$FILE", lines 25-27: > 2012-03-27 * Test > K 100.00 EUR diff --git a/test/baseline/dir-alias-fail.test b/test/baseline/dir-alias-fail.test index e063a330..24f7ed7b 100644 --- a/test/baseline/dir-alias-fail.test +++ b/test/baseline/dir-alias-fail.test @@ -7,6 +7,6 @@ alias Foo=Foo Bar test source -> 1 __ERROR__ -While parsing file "$FILE", line 3: +While parsing file "$FILE", line 3: Error: Illegal alias Foo=Foo end test diff --git a/test/baseline/dir-commodity.test b/test/baseline/dir-commodity.test index fc925648..935efdf1 100644 --- a/test/baseline/dir-commodity.test +++ b/test/baseline/dir-commodity.test @@ -12,7 +12,7 @@ commodity GBP test bal --pedantic -> 1 __ERROR__ -While parsing file "$FILE", line 10: +While parsing file "$FILE", line 10: While parsing posting: A 20.00 EUR ^^^^^^^^^ diff --git a/test/baseline/opt-pedantic.test b/test/baseline/opt-pedantic.test index fbb27b84..aca15410 100644 --- a/test/baseline/opt-pedantic.test +++ b/test/baseline/opt-pedantic.test @@ -8,7 +8,7 @@ test bal --pedantic -> 1 __ERROR__ -While parsing file "$FILE", line 2: +While parsing file "$FILE", line 2: While parsing posting: Expenses:Phone 20.00 GBP diff --git a/test/regress/15A80F68.test b/test/regress/15A80F68.test index 0b29b82d..4eb66fe7 100644 --- a/test/regress/15A80F68.test +++ b/test/regress/15A80F68.test @@ -6,7 +6,7 @@ test bal -> 1 __ERROR__ -While parsing file "$FILE", line 4: +While parsing file "$FILE", line 4: While parsing posting: A (2 FOO @ 10.00 EUR) = 20.00 EUR ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/test/regress/1A546C4D.test b/test/regress/1A546C4D.test index 97adc9de..d6ffb68e 100644 --- a/test/regress/1A546C4D.test +++ b/test/regress/1A546C4D.test @@ -4,7 +4,7 @@ test bal -> 1 __ERROR__ -While parsing file "$FILE", line 2: +While parsing file "$FILE", line 2: While parsing posting: Assets:Cash $1,00.00 ^^^^^^^^ diff --git a/test/regress/2E3496BD.test b/test/regress/2E3496BD.test index 82c7cde7..007bb25f 100644 --- a/test/regress/2E3496BD.test +++ b/test/regress/2E3496BD.test @@ -6,7 +6,7 @@ D 1,000.00 USD test bal -> 1 __ERROR__ -While parsing file "$FILE", line 5: +While parsing file "$FILE", line 5: While balancing transaction from "$FILE", lines 3-5: > 2007-12-31 * Start of year / Opening balances. > Account1 1000 EUR @ 1.6 USD diff --git a/test/regress/5D92A5EB.test b/test/regress/5D92A5EB.test index 1bdd7256..6d29eda6 100644 --- a/test/regress/5D92A5EB.test +++ b/test/regress/5D92A5EB.test @@ -14,7 +14,7 @@ test -J reg checking -> 1 __ERROR__ -While parsing file "$FILE", line 13: +While parsing file "$FILE", line 13: While parsing periodic transaction: > ~ Monthly from 2010/7/1 > Expenses:Auto:Gas $100.00 diff --git a/test/regress/6188B0EC.test b/test/regress/6188B0EC.test index b2aec910..3404fee4 100644 --- a/test/regress/6188B0EC.test +++ b/test/regress/6188B0EC.test @@ -4,7 +4,7 @@ test bal -> 1 __ERROR__ -While parsing file "$FILE", line 3: +While parsing file "$FILE", line 3: Error: File to include was not found: "$sourcepath/test/regress/6188B0EC-does-not-exist.dat" end test diff --git a/test/regress/8EAF77C0.test b/test/regress/8EAF77C0.test index f0a2829c..9d63951d 100644 --- a/test/regress/8EAF77C0.test +++ b/test/regress/8EAF77C0.test @@ -12,6 +12,6 @@ test reg -> 1 __ERROR__ -While parsing file "$FILE", line 5: +While parsing file "$FILE", line 5: Error: Unexpected whitespace at beginning of line end test diff --git a/test/regress/BF3C1F82-2.test b/test/regress/BF3C1F82-2.test index 453151ce..94d59e4d 100644 --- a/test/regress/BF3C1F82-2.test +++ b/test/regress/BF3C1F82-2.test @@ -2,11 +2,11 @@ include non-existent-ledger-file-BF3C1F82 test -f - reg -> 1 __ERROR__ -While parsing file "", line 2: +While parsing file "", line 2: Error: File to include was not found: "./non-existent-ledger-file-BF3C1F82" end test test -f /dev/stdin reg -> 1 __ERROR__ -While parsing file "", line 2: +While parsing file "", line 2: Error: File to include was not found: "./non-existent-ledger-file-BF3C1F82" end test diff --git a/test/regress/BF3C1F82.test b/test/regress/BF3C1F82.test index 50f4106f..9d4937bb 100644 --- a/test/regress/BF3C1F82.test +++ b/test/regress/BF3C1F82.test @@ -5,14 +5,14 @@ b test -f - reg -> 1 __ERROR__ -While parsing file "", line 3: +While parsing file "", line 3: While parsing transaction: <no source context> Error: Day of month is not valid for year end test test -f /dev/stdin reg -> 1 __ERROR__ -While parsing file "", line 3: +While parsing file "", line 3: While parsing transaction: <no source context> Error: Day of month is not valid for year diff --git a/test/regress/D51BFF74.test b/test/regress/D51BFF74.test index a13af897..08ed7a8e 100644 --- a/test/regress/D51BFF74.test +++ b/test/regress/D51BFF74.test @@ -16,7 +16,7 @@ test reg -> 1 __ERROR__ -While parsing file "$FILE", line 6: +While parsing file "$FILE", line 6: While parsing posting: Expenses:Food $- 20 ^^^^^ diff --git a/test/regress/D9C8EB08.test b/test/regress/D9C8EB08.test index fa02431b..eb4952ba 100644 --- a/test/regress/D9C8EB08.test +++ b/test/regress/D9C8EB08.test @@ -10,7 +10,7 @@ test bal -> 1 __ERROR__ -While parsing file "$FILE", line 9: +While parsing file "$FILE", line 9: Error: 'end' or 'end apply' found, but no enclosing 'apply' directive end test diff --git a/test/regress/DDB54BB8.test b/test/regress/DDB54BB8.test index 7d72043c..29b32151 100644 --- a/test/regress/DDB54BB8.test +++ b/test/regress/DDB54BB8.test @@ -4,7 +4,7 @@ test bal -> 1 __ERROR__ -While parsing file "$FILE", line 3: +While parsing file "$FILE", line 3: Unbalanced remainder is: -0,10€ Amount to balance against: diff --git a/test/regress/error-in-include.test b/test/regress/error-in-include.test index 58a06e25..10d8d1da 100644 --- a/test/regress/error-in-include.test +++ b/test/regress/error-in-include.test @@ -3,8 +3,8 @@ test bal -> 1 __ERROR__ -In file included from "$FILE", line 2: -While parsing file "$sourcepath/test/regress/error-in-include.dat", line 4: +In file included from "$FILE", line 2: +While parsing file "$sourcepath/test/regress/error-in-include.dat", line 4: While balancing transaction from "$sourcepath/test/regress/error-in-include.dat", lines 2-4: > 2014-05-13 * Does not balance > A $10.00 |