You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.error(`Fishbone: Could not update document. Changes are lost. Please consider closing and reopening the doc. Error= ${JSON.stringify(e)}.`);
237
-
vscode.window.showErrorMessage(`Fishbone: Could not update document. Changes are lost. Please consider closing and reopening the doc. Error= ${JSON.stringify(e)}.`);
236
+
console.error(`Fishbone: Could not update document. Changes are lost. Please consider closing and reopening the doc. Error= ${e.name}:${e.message}.`);
237
+
vscode.window.showErrorMessage(`Fishbone: Could not update document. Changes are lost. Please consider closing and reopening the doc. Error= ${e.name}:${e.message}.`);
238
238
}
239
239
break;
240
240
case'sAr':
@@ -279,7 +279,7 @@ export class FBAEditorProvider implements vscode.CustomTextEditorProvider, vscod
webviewPanel.webview.postMessage({type: e.type,res: {errors: [`request failed with err=${err}`]},id: e.id});
282
+
webviewPanel.webview.postMessage({type: e.type,res: {errors: [`request failed with err=${err.name}:${err.message}`]},id: e.id});
283
283
});
284
284
}
285
285
}
@@ -414,7 +414,7 @@ export class FBAEditorProvider implements vscode.CustomTextEditorProvider, vscod
414
414
yamlObj={};
415
415
}
416
416
}catch(e){
417
-
console.error('Could not get document as json. Content is not valid yaml e= '+e);
417
+
console.error(`Could not get document as json. Content is not valid yaml e=${e.name}:${e.message}`);
418
418
}
419
419
420
420
// only 'title', 'attributes' and 'fishbone' are updated for now. keep the rest:
@@ -490,7 +490,7 @@ export class FBAEditorProvider implements vscode.CustomTextEditorProvider, vscod
490
490
};
491
491
}
492
492
}catch(e){
493
-
console.error(`opening file failed with err:'${e}'`);
493
+
console.error(`opening file failed with err:'${e.name}:${e.message}'`);
494
494
}
495
495
}
496
496
returnnull;// delete the import rc
@@ -532,8 +532,8 @@ export class FBAEditorProvider implements vscode.CustomTextEditorProvider, vscod
532
532
};
533
533
}
534
534
}catch(e){
535
-
console.warn(`re-importing file '${rc.relPath}' failed due to:'${e}'`);
536
-
vscode.window.showWarningMessage(`re-importing file '${rc.relPath} failed due to:'${e}'`);
535
+
console.warn(`re-importing file '${rc.relPath}' failed due to:'${e.name}:${e.message}'`);
536
+
vscode.window.showWarningMessage(`re-importing file '${rc.relPath} failed due to:'${e.name}:${e.message}'`);
537
537
}
538
538
console.log('reimport done/failed');
539
539
}else{
@@ -564,8 +564,8 @@ export class FBAEditorProvider implements vscode.CustomTextEditorProvider, vscod
564
564
}catch(e){
565
565
// need to remove this one from the queue
566
566
docData.editsPending.shift();
567
-
console.error(`storing as YAML failed. Error=${e}`);
568
-
vscode.window.showErrorMessage(`Fishbone: Could not update document. Changes are lost. Please consider closing and reopening the doc. Storing as YAML failed. Error=${e}`);
567
+
console.error(`storing as YAML failed. Error=${e.name}:${e.message}`);
568
+
vscode.window.showErrorMessage(`Fishbone: Could not update document. Changes are lost. Please consider closing and reopening the doc. Storing as YAML failed. Error=${e.name}:${e.message}`);
569
569
returnfalse;
570
570
}
571
571
console.warn(`FBAEditorProvider.processEditsPendingQueue will apply edit with size=${edit.size}, editsPending.length=${docData.editsPending.length} version=${document.version}`);
@@ -706,10 +706,9 @@ export class FBAEditorProvider implements vscode.CustomTextEditorProvider, vscod
706
706
707
707
return{attributes: yamlObj?.attributes,fishbone: yamlObj.fishbone,title: yamlObj.title||'<please add title to .fba>'};
708
708
}catch(e){
709
-
vscode.window.showErrorMessage(`Fishbone: Could not get document as yaml. Content is not valid yaml. Error= ${e}`);
710
-
thrownewError('Could not get document as yaml. Content is not valid yaml e= '+e);
709
+
vscode.window.showErrorMessage(`Fishbone: Could not get document as yaml. Content is not valid yaml. Error= ${e.name}:${e.message}`);
710
+
thrownewError(`Fishbone: Could not get document as yaml. Content is not valid yaml. Error= ${e.name}:${e.message}`);
0 commit comments