Skip to content

Commit

Permalink
replace throw with warning on storage set with no workspace
Browse files Browse the repository at this point in the history
The functionality is not expected to work according to API, however it doesn't fail in VS Code

Signed-off-by: Amiram Wingarten <amiram.wingarten@sap.com>
  • Loading branch information
amiramw committed Mar 1, 2021
1 parent f8bcc19 commit c67ca4d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class PluginsKeyValueStorage {
async set(key: string, value: KeysToAnyValues, kind: PluginStorageKind): Promise<boolean> {
const dataPath = await this.getDataPath(kind);
if (!dataPath) {
throw new Error('Cannot save data: no opened workspace');
console.warn('Cannot save data: no opened workspace');
return false;
}

const data = await this.readFromFile(dataPath);
Expand Down

0 comments on commit c67ca4d

Please sign in to comment.