diff options
Diffstat (limited to 'src/global.cc')
-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); } |