storage - fallback to in-memory storage if workspace storage cannot be ceated

pull/65489/head
Benjamin Pasero 2018-12-20 12:17:49 +01:00
parent a88caf8b0b
commit 522688ed10
1 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,11 @@ export class StorageService extends Disposable implements IStorageService {
return Promise.reject(error);
});
}).then(void 0, error => {
onUnexpectedError(error);
// Upon error, fallback to in-memory storage
return this.createWorkspaceStorage(SQLiteStorageDatabase.IN_MEMORY_PATH).init();
});
}