We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc2f1a4 commit b21cd4dCopy full SHA for b21cd4d
packages/vscode/src/workbench.ts
@@ -189,7 +189,19 @@ export class Workbench {
189
} else {
190
config.folderUri = workspace as URI;
191
}
192
- await main(config);
+ try {
193
+ await main(config);
194
+ } catch (ex) {
195
+ if (ex.toString().indexOf("UriError") !== -1 || ex.toString().indexOf("backupPath") !== -1) {
196
+ /**
197
+ * Resolves the error of the workspace identifier being invalid.
198
+ */
199
+ this.workspace = undefined;
200
+ location.reload();
201
+
202
+ return;
203
+ }
204
205
const contextKeys = this.serviceCollection.get(IContextKeyService) as IContextKeyService;
206
const bounded = this.clipboardContextKey.bindTo(contextKeys);
207
client.clipboard.onPermissionChange((enabled) => {
0 commit comments