From 0947e097b1ef9feb4250eae071ac6ad7ffa7f14d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 25 Nov 2024 20:37:56 +0100 Subject: Mark all exception type methods as noexcept This is required for the built in exceptions, so let's do the same to avoid surprises. --- common/rfb/Exception.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common/rfb/Exception.h') diff --git a/common/rfb/Exception.h b/common/rfb/Exception.h index 0e74209c..b18f6d76 100644 --- a/common/rfb/Exception.h +++ b/common/rfb/Exception.h @@ -24,19 +24,19 @@ namespace rfb { class protocol_error : public std::runtime_error { public: - protocol_error(const char* what_arg) : std::runtime_error(what_arg) {} - protocol_error(const std::string& what_arg) : std::runtime_error(what_arg) {} + protocol_error(const char* what_arg) noexcept : std::runtime_error(what_arg) {} + protocol_error(const std::string& what_arg) noexcept : std::runtime_error(what_arg) {} }; class auth_error : public std::runtime_error { public: - auth_error(const char* reason) : std::runtime_error(reason) {} - auth_error(std::string& reason) : std::runtime_error(reason) {} + auth_error(const char* reason) noexcept : std::runtime_error(reason) {} + auth_error(std::string& reason) noexcept : std::runtime_error(reason) {} }; class auth_cancelled : public std::runtime_error { public: - auth_cancelled() + auth_cancelled() noexcept : std::runtime_error("Authentication cancelled") {} }; } -- cgit v1.2.3