diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-03-29 20:26:38 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-03-29 20:26:38 -0700 |
commit | 194a1b91af6d8848e4cc0dfbdcc153ee2dbed140 (patch) | |
tree | 17d0306f63900c9dc9a12a06948dd514acdd54f1 /src/libutil | |
parent | 1fa6a3e3354bd98707303476b5a54147ccdd533a (diff) |
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
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.cc | 2 | ||||
-rw-r--r-- | src/libutil/util.hh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 9b65bd77f..5cd4df8e6 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -947,7 +947,7 @@ Pid::Pid(pid_t pid) } -Pid::~Pid() +Pid::~Pid() noexcept(false) { if (pid != -1) kill(); } diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 860ddae06..29a70447e 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -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(); |