forked from lix-project/lix
Make things that can throw not noexcept anymore
This does involve making a large number of destructors able to throw,
because we had to change it high in the class hierarchy. Oh well.
Change-Id: Ib62d3d6895b755f20322bb8acc9bf43daf0174b2
This commit is contained in:
parent
1fa6a3e335
commit
194a1b91af
|
@ -108,7 +108,7 @@ DerivationGoal::DerivationGoal(const StorePath & drvPath, const BasicDerivation
|
|||
}
|
||||
|
||||
|
||||
DerivationGoal::~DerivationGoal()
|
||||
DerivationGoal::~DerivationGoal() noexcept(false)
|
||||
{
|
||||
/* Careful: we should never ever throw an exception from a
|
||||
destructor. */
|
||||
|
|
|
@ -215,7 +215,7 @@ struct DerivationGoal : public Goal
|
|||
DerivationGoal(const StorePath & drvPath, const BasicDerivation & drv,
|
||||
const OutputsSpec & wantedOutputs, Worker & worker,
|
||||
BuildMode buildMode = bmNormal);
|
||||
virtual ~DerivationGoal();
|
||||
virtual ~DerivationGoal() noexcept(false);
|
||||
|
||||
void timedOut(Error && ex) override;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public:
|
|||
: worker(worker)
|
||||
{ }
|
||||
|
||||
virtual ~Goal()
|
||||
virtual ~Goal() noexcept(false)
|
||||
{
|
||||
trace("goal destroyed");
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ void handleDiffHook(
|
|||
const Path LocalDerivationGoal::homeDir = "/homeless-shelter";
|
||||
|
||||
|
||||
LocalDerivationGoal::~LocalDerivationGoal()
|
||||
LocalDerivationGoal::~LocalDerivationGoal() noexcept(false)
|
||||
{
|
||||
/* Careful: we should never ever throw an exception from a
|
||||
destructor. */
|
||||
|
|
|
@ -179,7 +179,7 @@ struct LocalDerivationGoal : public DerivationGoal
|
|||
|
||||
using DerivationGoal::DerivationGoal;
|
||||
|
||||
virtual ~LocalDerivationGoal() override;
|
||||
virtual ~LocalDerivationGoal() noexcept(false) override;
|
||||
|
||||
/**
|
||||
* Whether we need to perform hash rewriting if there are valid output paths.
|
||||
|
|
|
@ -108,7 +108,7 @@ struct StoreConfig : public Config
|
|||
|
||||
static StringSet getDefaultSystemFeatures();
|
||||
|
||||
virtual ~StoreConfig() { }
|
||||
virtual ~StoreConfig() noexcept(false) { }
|
||||
|
||||
/**
|
||||
* The name of this type of store.
|
||||
|
@ -220,7 +220,7 @@ public:
|
|||
*/
|
||||
virtual void init() {};
|
||||
|
||||
virtual ~Store() { }
|
||||
virtual ~Store() noexcept(false) { }
|
||||
|
||||
virtual std::string getUri() = 0;
|
||||
|
||||
|
|
|
@ -947,7 +947,7 @@ Pid::Pid(pid_t pid)
|
|||
}
|
||||
|
||||
|
||||
Pid::~Pid()
|
||||
Pid::~Pid() noexcept(false)
|
||||
{
|
||||
if (pid != -1) kill();
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ public:
|
|||
AutoCloseFD(AutoCloseFD&& fd);
|
||||
~AutoCloseFD();
|
||||
AutoCloseFD& operator =(const AutoCloseFD & fd) = delete;
|
||||
AutoCloseFD& operator =(AutoCloseFD&& fd);
|
||||
AutoCloseFD& operator =(AutoCloseFD&& fd) noexcept(false);
|
||||
int get() const;
|
||||
explicit operator bool() const;
|
||||
int release();
|
||||
|
@ -384,7 +384,7 @@ class Pid
|
|||
public:
|
||||
Pid();
|
||||
Pid(pid_t pid);
|
||||
~Pid();
|
||||
~Pid() noexcept(false);
|
||||
void operator =(pid_t pid);
|
||||
operator pid_t();
|
||||
int kill();
|
||||
|
|
Loading…
Reference in a new issue