diff --git a/ReactCommon/cxxreact/MethodCall.cpp b/ReactCommon/cxxreact/MethodCall.cpp index a83c2955fe5..79c7f49a259 100644 --- a/ReactCommon/cxxreact/MethodCall.cpp +++ b/ReactCommon/cxxreact/MethodCall.cpp @@ -18,7 +18,7 @@ namespace react { static const char *errorPrefix = "Malformed calls from JS: "; -std::vector parseMethodCalls(folly::dynamic&& jsonData) throw(std::invalid_argument) { +std::vector parseMethodCalls(folly::dynamic&& jsonData) { if (jsonData.isNull()) { return {}; } @@ -77,4 +77,3 @@ std::vector parseMethodCalls(folly::dynamic&& jsonData) throw(std::i } }} - diff --git a/ReactCommon/cxxreact/MethodCall.h b/ReactCommon/cxxreact/MethodCall.h index b6ed095fb6c..be843b9abd2 100644 --- a/ReactCommon/cxxreact/MethodCall.h +++ b/ReactCommon/cxxreact/MethodCall.h @@ -27,6 +27,7 @@ struct MethodCall { , callId(cid) {} }; -std::vector parseMethodCalls(folly::dynamic&& calls) throw(std::invalid_argument); +/// \throws std::invalid_argument +std::vector parseMethodCalls(folly::dynamic&& calls); } } diff --git a/ReactCommon/cxxreact/RecoverableError.h b/ReactCommon/cxxreact/RecoverableError.h index 5aec7101c38..2ecc64bfb4a 100644 --- a/ReactCommon/cxxreact/RecoverableError.h +++ b/ReactCommon/cxxreact/RecoverableError.h @@ -23,7 +23,7 @@ struct RecoverableError : public std::exception { : m_what { "facebook::react::Recoverable: " + what_ } {} - virtual const char* what() const throw() override { return m_what.c_str(); } + virtual const char* what() const noexcept override { return m_what.c_str(); } /** * runRethrowingAsRecoverable