diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp index d612cd672..c8e4e70bd 100644 --- a/ReactCommon/cxxreact/JSCExecutor.cpp +++ b/ReactCommon/cxxreact/JSCExecutor.cpp @@ -397,7 +397,7 @@ void JSCExecutor::loadApplicationScript( } #endif -void JSCExecutor::loadApplicationScript(std::unique_ptr script, std::string sourceURL) throw(JSException) { +void JSCExecutor::loadApplicationScript(std::unique_ptr script, std::string sourceURL) { SystraceSection s("JSCExecutor::loadApplicationScript", "sourceURL", sourceURL); diff --git a/ReactCommon/cxxreact/JSCExecutor.h b/ReactCommon/cxxreact/JSCExecutor.h index d631e0056..25bccb457 100644 --- a/ReactCommon/cxxreact/JSCExecutor.h +++ b/ReactCommon/cxxreact/JSCExecutor.h @@ -62,7 +62,7 @@ public: virtual void loadApplicationScript( std::unique_ptr script, - std::string sourceURL) throw(JSException) override; + std::string sourceURL) override; #ifdef WITH_FBJSCEXTENSIONS virtual void loadApplicationScript( diff --git a/ReactCommon/cxxreact/RecoverableError.h b/ReactCommon/cxxreact/RecoverableError.h index 153c31725..f1775043f 100644 --- a/ReactCommon/cxxreact/RecoverableError.h +++ b/ReactCommon/cxxreact/RecoverableError.h @@ -18,7 +18,7 @@ namespace detail { struct RecoverableError : public std::exception { explicit RecoverableError(const std::string &what_) - : m_what {what_} + : m_what { "facebook::react::Recoverable: " + what_ } {} virtual const char* what() const throw() override { return m_what.c_str(); } diff --git a/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp b/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp index 288896102..94db13e53 100644 --- a/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp +++ b/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp @@ -16,7 +16,7 @@ TEST(RecoverableError, RunRethrowingAsRecoverableRecoverTest) { }); FAIL() << "Unthrown exception"; } catch (const RecoverableError &err) { - ASSERT_STREQ(err.what(), "catch me"); + ASSERT_STREQ(err.what(), "facebook::react::Recoverable: catch me"); } catch (...) { FAIL() << "Uncaught exception"; }