Don't push and pop reports unless at a REPL.
This commit is contained in:
parent
234304e3a3
commit
fdc8e401bf
1 changed files with 3 additions and 3 deletions
|
|
@ -219,9 +219,9 @@ int global_scope_t::execute_command_wrapper(strings_list args, bool at_repl)
|
||||||
int status = 1;
|
int status = 1;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
push_report();
|
if (at_repl) push_report();
|
||||||
execute_command(args, at_repl);
|
execute_command(args, at_repl);
|
||||||
pop_report();
|
if (at_repl) pop_report();
|
||||||
|
|
||||||
// If we've reached this point, everything succeeded fine. Ledger uses
|
// If we've reached this point, everything succeeded fine. Ledger uses
|
||||||
// exceptions to notify of error conditions, so if you're using gdb,
|
// 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;
|
status = 0;
|
||||||
}
|
}
|
||||||
catch (const std::exception& err) {
|
catch (const std::exception& err) {
|
||||||
pop_report();
|
if (at_repl) pop_report();
|
||||||
report_error(err);
|
report_error(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue