From: Matthias Maier Date: Fri, 25 Oct 2013 11:24:34 +0000 (+0000) Subject: Bugfix: We cannot throw in Subscriptor::do_unsubscribe either because it is used... X-Git-Tag: v8.1.0~512 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0eaa417710a282512d860329062503f622e20e;p=dealii.git 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 --- 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)