From bc0eaa417710a282512d860329062503f622e20e Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 25 Oct 2013 11:24:34 +0000 Subject: [PATCH] Bugfix: We cannot throw in Subscriptor::do_unsubscribe either because it is used in the destructor of SmartPointer. git-svn-id: https://svn.dealii.org/trunk@31422 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/base/subscriptor.cc | 6 +++--- tests/base/reference.debug.output | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deal.II/source/base/subscriptor.cc b/deal.II/source/base/subscriptor.cc index bc039582d7..505eff1214 100644 --- a/deal.II/source/base/subscriptor.cc +++ b/deal.II/source/base/subscriptor.cc @@ -171,7 +171,7 @@ void Subscriptor::do_unsubscribe (const char *id) const { #ifdef DEBUG const char *name = (id != 0) ? id : unknown_subscriber; - Assert (counter>0, ExcNoSubscriber(object_info->name(), name)); + AssertNothrow (counter>0, ExcNoSubscriber(object_info->name(), name)); // This is for the case that we do // not abort after the exception if (counter == 0) @@ -182,8 +182,8 @@ void Subscriptor::do_unsubscribe (const char *id) const #ifndef DEAL_II_WITH_THREADS map_iterator it = counter_map.find(name); - Assert (it != counter_map.end(), ExcNoSubscriber(object_info->name(), name)); - Assert (it->second > 0, ExcNoSubscriber(object_info->name(), name)); + AssertNothrow (it != counter_map.end(), ExcNoSubscriber(object_info->name(), name)); + AssertNothrow (it->second > 0, ExcNoSubscriber(object_info->name(), name)); it->second--; #endif diff --git a/tests/base/reference.debug.output b/tests/base/reference.debug.output index 580502fa26..daaec4daac 100644 --- a/tests/base/reference.debug.output +++ b/tests/base/reference.debug.output @@ -12,6 +12,6 @@ DEAL::Construct D DEAL::Destruct D DEAL::Exception: ExcInUse (counter, object_info->name(), infostring) DEAL::Destruct C +DEAL::Exception: ExcNoSubscriber(object_info->name(), name) DEAL::Destruct B DEAL::Destruct A -DEAL::ExcNoSubscriber(object_info->name(), name) -- 2.39.5