From 5b71408b8909669c30b29ec1f42423cddbd347c4 Mon Sep 17 00:00:00 2001 From: Yiding Jia Date: Wed, 14 Nov 2018 21:14:23 -0800 Subject: [PATCH] Remove dynamic exception specification in RN MethodCall.h/cpp Summary: Dynamic exception specifications are removed in C++17. Reviewed By: mhorowitz Differential Revision: D13078933 fbshipit-source-id: b1a1d7aed3f634c6bc699ab05a8c218bdddf5993 --- ReactCommon/cxxreact/MethodCall.cpp | 3 +-- ReactCommon/cxxreact/MethodCall.h | 3 ++- ReactCommon/cxxreact/RecoverableError.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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