]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Address Assert in destructors 4077/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 17 Mar 2017 10:43:52 +0000 (11:43 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 17 Mar 2017 10:44:20 +0000 (11:44 +0100)
include/deal.II/base/thread_management.h
include/deal.II/base/timer.h
include/deal.II/matrix_free/fe_evaluation.h

index 1e9d9a5b82d4164056d4b672c7adeec1d295dd3a..fec78854a53959bbcebb58382c660fb722bbf5f2 100644 (file)
@@ -2973,8 +2973,8 @@ namespace Threads
       // of the arena". rather, let's explicitly destroy the empty
       // task object. before that, make sure that the task has been
       // shut down, expressed by a zero reference count
-      Assert (task != 0, ExcInternalError());
-      Assert (task->ref_count()==0, ExcInternalError());
+      AssertNothrow (task != 0, ExcInternalError());
+      AssertNothrow (task->ref_count()==0, ExcInternalError());
       task->destroy (*task);
     }
 
index 155596d278af430136acd2ceeac57a7befda91a7..77d0037637a24ce4d4e7d59caea5f40b68d2f962 100644 (file)
@@ -752,7 +752,12 @@ TimerOutput::Scope::Scope(dealii::TimerOutput &timer_, const std::string &sectio
 inline
 TimerOutput::Scope::~Scope()
 {
-  stop();
+  try
+    {
+      stop();
+    }
+  catch (...)
+    {}
 }
 
 inline
index a0eed7b69f806ce1e897737a5251f92ee7889ae7..ea77ffa1486c2528da196602afc51664b1fa7c58 100644 (file)
@@ -2419,7 +2419,12 @@ FEEvaluationBase<dim,n_components_,Number>::~FEEvaluationBase ()
 {
   if (matrix_info != 0)
     {
-      matrix_info->release_scratch_data(scratch_data_array);
+      try
+        {
+          matrix_info->release_scratch_data(scratch_data_array);
+        }
+      catch (...)
+        {}
     }
   else
     {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.