From 7fa5dcc7f50a625583b641aad2985bd4f0f08a45 Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 16 Apr 2013 14:42:54 +0000 Subject: [PATCH] Add a note in changes.h git-svn-id: https://svn.dealii.org/trunk@29302 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 7 +++++++ deal.II/include/deal.II/base/exceptions.h | 4 ++-- deal.II/source/base/exceptions.cc | 11 +++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 38a6f061a9..0b389615b6 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -25,6 +25,13 @@ inconvenience this causes.
    +
  1. Changed: Internal structures of ExceptionBase are now thread safe. The +Assert macro does not print an exception to deallog any more prior to +throwing if deal_II_exceptions::abort_on_exception==false. Removed: A +number of obsolete Exceptions that are not used in the library any more. +
    +(Matthias Maier, 2013/04/16) +
  2. Removed: A number of header files that have been deprecated a long time ago have been removed. All of them had previously only included the header file that had superseded them. To upgrade, simply include the currently used diff --git a/deal.II/include/deal.II/base/exceptions.h b/deal.II/include/deal.II/base/exceptions.h index e850c4e51e..6970b99df1 100644 --- a/deal.II/include/deal.II/base/exceptions.h +++ b/deal.II/include/deal.II/base/exceptions.h @@ -195,8 +195,8 @@ namespace deal_II_exceptions /** * Conditionally abort the program. Depending on whether * disable_abort_on_exception was called, this function either aborts - * the program flow by printing an error message and calling - * std::abort(), or throws @p exc instead. + * the program flow by printing the error message provided by @p exc + * and calling std::abort(), or throws @p exc instead. */ void abort (const ExceptionBase &exc); diff --git a/deal.II/source/base/exceptions.cc b/deal.II/source/base/exceptions.cc index f7f5582a3b..14689ea8d1 100644 --- a/deal.II/source/base/exceptions.cc +++ b/deal.II/source/base/exceptions.cc @@ -130,10 +130,12 @@ void ExceptionBase::set_fields (const char *f, print_stack_trace (converter); if (!deal_II_exceptions::additional_assert_output.empty()) - converter << "--------------------------------------------------------" - << std::endl - << deal_II_exceptions::additional_assert_output - << std::endl; + { + converter << "--------------------------------------------------------" + << std::endl + << deal_II_exceptions::additional_assert_output + << std::endl; + } converter << "--------------------------------------------------------" << std::endl; @@ -281,6 +283,7 @@ namespace deal_II_exceptions { if(dealii::deal_II_exceptions::abort_on_exception) { + //* Print the error message and bail out: std::cerr << exc.what() << std::endl; std::abort(); } -- 2.39.5