File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -139,11 +139,10 @@ export class AssetGenerator {
139
139
let projectJsonObject : any ;
140
140
141
141
try {
142
- // TODO: This error should be surfaced to the user. If the JSON can't be parsed
143
- // (maybe due to a syntax error like an extra comma), the user should be notified
144
- // to fix up their project.json.
145
142
projectJsonObject = tolerantParse ( projectFileText ) ;
146
- } catch ( error ) {
143
+ }
144
+ catch ( error ) {
145
+ vscode . window . showErrorMessage ( 'Failed to parse project.json file' ) ;
147
146
projectJsonObject = null ;
148
147
}
149
148
@@ -360,13 +359,11 @@ function getBuildOperations(tasksJsonPath: string) {
360
359
361
360
let buildTask : tasks . TaskDescription ;
362
361
363
- try
364
- {
362
+ try {
365
363
const tasksJson : tasks . TaskConfiguration = tolerantParse ( text ) ;
366
364
buildTask = tasksJson . tasks . find ( td => td . taskName === 'build' ) ;
367
365
}
368
- catch ( error )
369
- {
366
+ catch ( error ) {
370
367
vscode . window . showErrorMessage ( `Failed to parse tasks.json file` ) ;
371
368
buildTask = undefined ;
372
369
}
You can’t perform that action at this time.
0 commit comments