mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: noexcept specification instead of throw()
- make IOerror constructors explicit
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -55,7 +55,7 @@ Foam::IOerror::IOerror(const dictionary& errDict)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::IOerror::~IOerror() throw()
|
Foam::IOerror::~IOerror() noexcept
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2014 OpenFOAM Foundation
|
Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -129,7 +129,7 @@ Foam::error::error(const error& err)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::error::~error() throw()
|
Foam::error::~error() noexcept
|
||||||
{
|
{
|
||||||
delete messageStreamPtr_;
|
delete messageStreamPtr_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,15 +67,13 @@ class error
|
|||||||
public std::exception,
|
public std::exception,
|
||||||
public messageStream
|
public messageStream
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected Data
|
||||||
|
|
||||||
string functionName_;
|
string functionName_;
|
||||||
string sourceFileName_;
|
string sourceFileName_;
|
||||||
label sourceFileLineNumber_;
|
label sourceFileLineNumber_;
|
||||||
|
|
||||||
bool throwExceptions_;
|
bool throwExceptions_;
|
||||||
OStringStream* messageStreamPtr_;
|
OStringStream* messageStreamPtr_;
|
||||||
|
|
||||||
@ -90,15 +88,15 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
explicit error(const dictionary& errDict);
|
explicit error(const dictionary& errDict);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Copy construct
|
||||||
error(const error& err);
|
error(const error& err);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~error() throw();
|
virtual ~error() noexcept;
|
||||||
|
|
||||||
|
|
||||||
// Static Member Functions
|
// Static Functions
|
||||||
|
|
||||||
//- Emit warning on stderr about something being old.
|
//- Emit warning on stderr about something being old.
|
||||||
// \param what description for the warning
|
// \param what description for the warning
|
||||||
@ -220,7 +218,7 @@ class IOerror
|
|||||||
:
|
:
|
||||||
public error
|
public error
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
string ioFileName_;
|
string ioFileName_;
|
||||||
label ioStartLineNumber_;
|
label ioStartLineNumber_;
|
||||||
@ -232,17 +230,17 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from title string
|
//- Construct from title string
|
||||||
IOerror(const string& title);
|
explicit IOerror(const string& title);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
IOerror(const dictionary& errDict);
|
explicit IOerror(const dictionary& errDict);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~IOerror() throw();
|
virtual ~IOerror() noexcept;
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
inline const string& ioFileName() const
|
inline const string& ioFileName() const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user