From: David Wells Date: Sat, 31 Mar 2018 20:13:59 +0000 (-0400) Subject: Move some destructor code inside a try block. X-Git-Tag: v9.0.0-rc1~258^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6131%2Fhead;p=dealii.git Move some destructor code inside a try block. This was caught by coverity. --- diff --git a/source/base/timer.cc b/source/base/timer.cc index 3f0b4adf07..97c213483a 100644 --- a/source/base/timer.cc +++ b/source/base/timer.cc @@ -355,13 +355,14 @@ TimerOutput::~TimerOutput() { while (active_sections.size() > 0) leave_subsection(); + // don't print unless we leave all subsections + if ((output_frequency == summary || + output_frequency == every_call_and_summary) + && output_is_enabled == true) + print_summary(); } catch (...) {} - - if ( (output_frequency == summary || output_frequency == every_call_and_summary) - && output_is_enabled == true) - print_summary(); }; // avoid communicating with other processes if there is an uncaught