From 29763624cd6396e30259e4d702641813e4c122e2 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 10 Jan 2001 13:42:42 +0000 Subject: [PATCH] Add missing exception specification to ExceptionBase::what. git-svn-id: https://svn.dealii.org/branches/Branch-3-1@3626 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/exceptions.h | 4 ++-- deal.II/base/source/exceptions.cc | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/deal.II/base/include/base/exceptions.h b/deal.II/base/include/base/exceptions.h index 5861028b04..5aa2a879b3 100644 --- a/deal.II/base/include/base/exceptions.h +++ b/deal.II/base/include/base/exceptions.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -333,7 +333,7 @@ class ExceptionBase : public exception * @p{DeclException*} macros with the @p{throw} * mechanism or the @p{AssertThrow} macro. */ - virtual const char * what () const; + virtual const char * what () const throw (); protected: /** diff --git a/deal.II/base/source/exceptions.cc b/deal.II/base/source/exceptions.cc index 2cff5a7e34..a67d5209ab 100644 --- a/deal.II/base/source/exceptions.cc +++ b/deal.II/base/source/exceptions.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -32,7 +32,8 @@ void ExceptionBase::SetFields (const char* f, const int l, const char *func, const char *c, - const char *e) { + const char *e) +{ file = f; line = l; function = func; @@ -41,7 +42,9 @@ void ExceptionBase::SetFields (const char* f, }; -void ExceptionBase::PrintExcData (ostream &out) const { + +void ExceptionBase::PrintExcData (ostream &out) const +{ out << "An error occurred in line <" << line << "> of file <" << file << "> in function" << endl @@ -54,12 +57,16 @@ void ExceptionBase::PrintExcData (ostream &out) const { }; -void ExceptionBase::PrintInfo (ostream &out) const { + +void ExceptionBase::PrintInfo (ostream &out) const +{ out << "(none)" << endl; }; -const char * ExceptionBase::what () const { + +const char * ExceptionBase::what () const throw () +{ // have a place where to store the // description of the exception as a char * // -- 2.39.5