Better error message for broken JSON
parent
50474dff1f
commit
d21cc1912c
|
@ -465,7 +465,7 @@ if (!JSON)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the text is not JSON parseable, then a SyntaxError is thrown.
|
// If the text is not JSON parseable, then a SyntaxError is thrown.
|
||||||
throw new SyntaxError('JSON.parse');
|
throw new SyntaxError('JSON.parse: ' + text);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in New Issue