Exposing Recoverable Errors
Differential Revision: D4383792 fbshipit-source-id: e6d0f57fcaacf242e95bfcf589a4fa840c317fe5
This commit is contained in:
parent
24f3add010
commit
da428d6c3d
|
@ -397,7 +397,7 @@ void JSCExecutor::loadApplicationScript(
|
|||
}
|
||||
#endif
|
||||
|
||||
void JSCExecutor::loadApplicationScript(std::unique_ptr<const JSBigString> script, std::string sourceURL) throw(JSException) {
|
||||
void JSCExecutor::loadApplicationScript(std::unique_ptr<const JSBigString> script, std::string sourceURL) {
|
||||
SystraceSection s("JSCExecutor::loadApplicationScript",
|
||||
"sourceURL", sourceURL);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
virtual void loadApplicationScript(
|
||||
std::unique_ptr<const JSBigString> script,
|
||||
std::string sourceURL) throw(JSException) override;
|
||||
std::string sourceURL) override;
|
||||
|
||||
#ifdef WITH_FBJSCEXTENSIONS
|
||||
virtual void loadApplicationScript(
|
||||
|
|
|
@ -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(); }
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue