diff --git a/src/OpenFOAM/db/error/IOerror.C b/src/OpenFOAM/db/error/IOerror.C index 55e7de0645..59f47f0751 100644 --- a/src/OpenFOAM/db/error/IOerror.C +++ b/src/OpenFOAM/db/error/IOerror.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,7 +55,7 @@ Foam::IOerror::IOerror(const dictionary& errDict) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::IOerror::~IOerror() throw() +Foam::IOerror::~IOerror() noexcept {} diff --git a/src/OpenFOAM/db/error/error.C b/src/OpenFOAM/db/error/error.C index ecb74cdf64..e113db8ae7 100644 --- a/src/OpenFOAM/db/error/error.C +++ b/src/OpenFOAM/db/error/error.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -129,7 +129,7 @@ Foam::error::error(const error& err) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::error::~error() throw() +Foam::error::~error() noexcept { delete messageStreamPtr_; } diff --git a/src/OpenFOAM/db/error/error.H b/src/OpenFOAM/db/error/error.H index 7717bb002f..650fae89cd 100644 --- a/src/OpenFOAM/db/error/error.H +++ b/src/OpenFOAM/db/error/error.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,15 +67,13 @@ class error public std::exception, public messageStream { - protected: - // Protected data + // Protected Data string functionName_; string sourceFileName_; label sourceFileLineNumber_; - bool throwExceptions_; OStringStream* messageStreamPtr_; @@ -90,15 +88,15 @@ public: //- Construct from dictionary explicit error(const dictionary& errDict); - //- Construct as copy + //- Copy construct error(const error& err); //- Destructor - virtual ~error() throw(); + virtual ~error() noexcept; - // Static Member Functions + // Static Functions //- Emit warning on stderr about something being old. // \param what description for the warning @@ -220,7 +218,7 @@ class IOerror : public error { - // Private data + // Private Data string ioFileName_; label ioStartLineNumber_; @@ -232,17 +230,17 @@ public: // Constructors //- Construct from title string - IOerror(const string& title); + explicit IOerror(const string& title); //- Construct from dictionary - IOerror(const dictionary& errDict); + explicit IOerror(const dictionary& errDict); //- Destructor - virtual ~IOerror() throw(); + virtual ~IOerror() noexcept; - // Member functions + // Member Functions inline const string& ioFileName() const {