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
This commit is contained in:
Yiding Jia 2018-11-14 21:14:23 -08:00 committed by Facebook Github Bot
parent 06c13b3e06
commit 5b71408b89
3 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ namespace react {
static const char *errorPrefix = "Malformed calls from JS: ";
std::vector<MethodCall> parseMethodCalls(folly::dynamic&& jsonData) throw(std::invalid_argument) {
std::vector<MethodCall> parseMethodCalls(folly::dynamic&& jsonData) {
if (jsonData.isNull()) {
return {};
}
@ -77,4 +77,3 @@ std::vector<MethodCall> parseMethodCalls(folly::dynamic&& jsonData) throw(std::i
}
}}

View File

@ -27,6 +27,7 @@ struct MethodCall {
, callId(cid) {}
};
std::vector<MethodCall> parseMethodCalls(folly::dynamic&& calls) throw(std::invalid_argument);
/// \throws std::invalid_argument
std::vector<MethodCall> parseMethodCalls(folly::dynamic&& calls);
} }

View File

@ -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