Permalink
Browse files

Dump invalid json when call Value::fromJSON failed

Summary:
See #9117
Closes #10231

Differential Revision: D3974063

Pulled By: javache

fbshipit-source-id: 63d3ae02ae731cd5a63fcb3a645c612c57cbb8b4
  • Loading branch information...
1 parent fb355f6 commit 9a7e4b4902ffc733faa0facf86e9ceacd9f3f6a9 @leeight leeight committed with Facebook Github Bot Oct 5, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 ReactCommon/cxxreact/Value.cpp
@@ -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);
}

0 comments on commit 9a7e4b4

Please sign in to comment.