aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/Exception.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-11-25 20:37:56 +0100
committerPierre Ossman <ossman@cendio.se>2024-11-26 10:10:31 +0100
commit0947e097b1ef9feb4250eae071ac6ad7ffa7f14d (patch)
treeced07da074aee6af79e1b79f2e3ed67e5efcaa88 /common/rdr/Exception.h
parent5c14cd9f7ca1aeb19a7a69ab44e94f025ad39bf4 (diff)
downloadtigervnc-0947e097b1ef9feb4250eae071ac6ad7ffa7f14d.tar.gz
tigervnc-0947e097b1ef9feb4250eae071ac6ad7ffa7f14d.zip
Mark all exception type methods as noexcept
This is required for the built in exceptions, so let's do the same to avoid surprises.
Diffstat (limited to 'common/rdr/Exception.h')
-rw-r--r--common/rdr/Exception.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/common/rdr/Exception.h b/common/rdr/Exception.h
index f3f878cb..d3cecc18 100644
--- a/common/rdr/Exception.h
+++ b/common/rdr/Exception.h
@@ -30,49 +30,49 @@ namespace rdr {
class posix_error : public std::runtime_error {
public:
int err;
- posix_error(const char* what_arg, int err_);
- posix_error(const std::string& what_arg, int err_);
+ posix_error(const char* what_arg, int err_) noexcept;
+ posix_error(const std::string& what_arg, int err_) noexcept;
private:
- std::string strerror(int err_) const;
+ std::string strerror(int err_) const noexcept;
};
#ifdef WIN32
class win32_error : public std::runtime_error {
public:
unsigned err;
- win32_error(const char* what_arg, unsigned err_);
- win32_error(const std::string& what_arg, unsigned err_);
+ win32_error(const char* what_arg, unsigned err_) noexcept;
+ win32_error(const std::string& what_arg, unsigned err_) noexcept;
private:
- std::string strerror(unsigned err_) const;
+ std::string strerror(unsigned err_) const noexcept;
};
#endif
#ifdef WIN32
class socket_error : public win32_error {
public:
- socket_error(const char* what_arg, unsigned err_) : win32_error(what_arg, err_) {}
- socket_error(const std::string& what_arg, unsigned err_) : win32_error(what_arg, err_) {}
+ socket_error(const char* what_arg, unsigned err_) noexcept : win32_error(what_arg, err_) {}
+ socket_error(const std::string& what_arg, unsigned err_) noexcept : win32_error(what_arg, err_) {}
};
#else
class socket_error : public posix_error {
public:
- socket_error(const char* what_arg, unsigned err_) : posix_error(what_arg, err_) {}
- socket_error(const std::string& what_arg, unsigned err_) : posix_error(what_arg, err_) {}
+ socket_error(const char* what_arg, unsigned err_) noexcept : posix_error(what_arg, err_) {}
+ socket_error(const std::string& what_arg, unsigned err_) noexcept : posix_error(what_arg, err_) {}
};
#endif
class getaddrinfo_error : public std::runtime_error {
public:
int err;
- getaddrinfo_error(const char* s, int err_);
- getaddrinfo_error(const std::string& s, int err_);
+ getaddrinfo_error(const char* s, int err_) noexcept;
+ getaddrinfo_error(const std::string& s, int err_) noexcept;
private:
- std::string strerror(int err_) const;
+ std::string strerror(int err_) const noexcept;
};
class end_of_stream : public std::runtime_error {
public:
- end_of_stream() : std::runtime_error("End of stream") {}
+ end_of_stream() noexcept : std::runtime_error("End of stream") {}
};
}