Improve error message for unknown field

This commit is contained in:
Stefan Thomas
2014-02-04 15:40:50 -08:00
parent 257e9da563
commit 372c508911

View File

@@ -667,7 +667,7 @@ var STObject = exports.Object = new SerializedType({
keys.forEach(function (key) {
if ("undefined" === typeof INVERSE_FIELDS_MAP[key]) {
throw new Error("JSON contains unknown field.");
throw new Error("JSON contains unknown field: '" + key + "'");
}
});