We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7308da commit ff1afb4Copy full SHA for ff1afb4
1 file changed
src/loader/filetypes/JSONFile.js
@@ -98,7 +98,18 @@ var JSONFile = new Class({
98
{
99
this.state = CONST.FILE_PROCESSING;
100
101
- var json = JSON.parse(this.xhrLoader.responseText);
+ try
102
+ {
103
+ var json = JSON.parse(this.xhrLoader.responseText);
104
+ }
105
+ catch (e)
106
107
+ console.warn('Invalid JSON: ' + this.key);
108
+
109
+ this.onProcessError();
110
111
+ throw e;
112
113
114
var key = this.config;
115
0 commit comments