Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
fix(error): handling throw error to get catched on the store
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoishi committed Oct 4, 2022
1 parent a58daee commit 7afb6ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ class Config {
* @param {IConfig} - config object to store as config file
*/
private async write(config: IConfig): Promise<void> {
return this.writeFile(this.configFullPath, config);
return await this.writeFile(this.configFullPath, config).catch(error => {
throw error;
});
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/lib/util/tauri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ export async function writeFile(
await invoke('create_file', {
path: configFullPath,
content: JSON.stringify(config, null, 2)
}).catch((error) => errorLogger(error));
});
}

0 comments on commit 7afb6ba

Please sign in to comment.