diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-06 23:38:51 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-06 23:38:51 -0400 |
commit | fdc8e401bf9f342c42cef52eeb5b5e566ac09197 (patch) | |
tree | cdda2075f28363a2a7eb57995f78f8d41fae1dfe /src | |
parent | 234304e3a3d2ba1eed989194e2ee7b90b3d661f6 (diff) | |
download | fork-ledger-fdc8e401bf9f342c42cef52eeb5b5e566ac09197.tar.gz fork-ledger-fdc8e401bf9f342c42cef52eeb5b5e566ac09197.tar.bz2 fork-ledger-fdc8e401bf9f342c42cef52eeb5b5e566ac09197.zip |
Don't push and pop reports unless at a REPL.
Diffstat (limited to 'src')
-rw-r--r-- | src/global.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/global.cc b/src/global.cc index 36614c14..9dc4c647 100644 --- a/src/global.cc +++ b/src/global.cc @@ -219,9 +219,9 @@ int global_scope_t::execute_command_wrapper(strings_list args, bool at_repl) int status = 1; try { - push_report(); + if (at_repl) push_report(); execute_command(args, at_repl); - pop_report(); + if (at_repl) pop_report(); // If we've reached this point, everything succeeded fine. Ledger uses // exceptions to notify of error conditions, so if you're using gdb, @@ -229,7 +229,7 @@ int global_scope_t::execute_command_wrapper(strings_list args, bool at_repl) status = 0; } catch (const std::exception& err) { - pop_report(); + if (at_repl) pop_report(); report_error(err); } |