Skip to content
Snippets Groups Projects
Commit b5b55fbd authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: noexcept specification instead of throw()

- make IOerror constructors explicit
parent 669f3de3
No related merge requests found
......@@ -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
{}
......
......@@ -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_;
}
......
......@@ -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
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment