From fb5678e33ace025d289043a70694c9c6942cf65b Mon Sep 17 00:00:00 2001 From: Ashok Menon Date: Mon, 12 Dec 2016 08:38:30 -0800 Subject: [PATCH] Generalising JSCompiledSourceError to JSLoadSourceError Reviewed By: javache Differential Revision: D4312888 fbshipit-source-id: de38066247f52eeb64efa48807882b96e3737d0e --- ReactCommon/cxxreact/JSCExecutor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp index cc49b719a17fb7..fd4e79d6bff8b4 100644 --- a/ReactCommon/cxxreact/JSCExecutor.cpp +++ b/ReactCommon/cxxreact/JSCExecutor.cpp @@ -373,19 +373,19 @@ void JSCExecutor::loadApplicationScript( { String jsSourceURL(m_context, sourceURL.c_str()); - JSCompiledSourceError jsError; + JSLoadSourceError jsError; auto bcSourceCode = JSCreateCompiledSourceCode(fd, jsSourceURL, &jsError); switch (jsError) { - case JSCompiledSourceErrorOnRead: - case JSCompiledSourceErrorNotCompiled: + case JSLoadSourceErrorOnRead: + case JSLoadSourceErrorNotCompiled: // Not bytecode, fall through. return JSExecutor::loadApplicationScript(fd, sourceURL); - case JSCompiledSourceErrorVersionMismatch: + case JSLoadSourceErrorVersionMismatch: throw std::runtime_error("Compiled Source Version Mismatch"); - case JSCompiledSourceErrorNone: + case JSLoadSourceErrorNone: folly::throwOnFail( bcSourceCode != nullptr, "Unexpected error opening compiled bundle"