Dump invalid json when call Value::fromJSON failed
Summary: See #9117 Closes https://github.com/facebook/react-native/pull/10231 Differential Revision: D3974063 Pulled By: javache fbshipit-source-id: 63d3ae02ae731cd5a63fcb3a645c612c57cbb8b4
This commit is contained in:
parent
fb355f663d
commit
9a7e4b4902
|
@ -53,7 +53,7 @@ std::string Value::toJSONString(unsigned indent) const {
|
|||
Value Value::fromJSON(JSContextRef ctx, const String& json) {
|
||||
auto result = JSValueMakeFromJSONString(ctx, json);
|
||||
if (!result) {
|
||||
throwJSExecutionException("Failed to create String from JSON");
|
||||
throwJSExecutionException("Failed to create String from JSON: %s", json.str().c_str());
|
||||
}
|
||||
return Value(ctx, result);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue