diff options
Diffstat (limited to 'src/global.h')
-rw-r--r-- | src/global.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/global.h b/src/global.h index 34577656..31a0a480 100644 --- a/src/global.h +++ b/src/global.h @@ -75,10 +75,14 @@ public: void push_report() { report_stack.push_front(new report_t(report_stack.front())); + scope_t::default_scope = &report(); } void pop_report() { - if (! report_stack.empty()) - report_stack.pop_front(); + assert(! report_stack.empty()); + report_stack.pop_front(); + // There should always be the "default report" waiting on the stack. + assert(! report_stack.empty()); + scope_t::default_scope = &report(); } void report_error(const std::exception& err); |