Skip to content

エラーメッセージのロギング処理を追加 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/commands/compose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ export async function compose (resource?: Uri) {
commands.executeCommand('vscode.open', Uri.parse(item.url));
}
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

handleErrorMessage(error);
}
});
Expand Down
3 changes: 3 additions & 0 deletions src/commands/deleteItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export async function deleteItem (resource: { item: Item }) {
'投稿を削除しました',
));
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

return handleErrorMessage(error);
}
}
3 changes: 3 additions & 0 deletions src/commands/editTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export async function editTags (resource: { item: Item }) {
'タグを編集しました',
));
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

return handleErrorMessage(error);
}
});
Expand Down
3 changes: 3 additions & 0 deletions src/commands/editTitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export function editTitle (resource: { item: Item }) {
'タイトルを編集しました',
));
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

return handleErrorMessage(error);
}
});
Expand Down
3 changes: 3 additions & 0 deletions src/commands/expandItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export async function expandItems () {
await qiitaItemsProvider.expandItems();
}
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

handleErrorMessage(error);
}
}
3 changes: 3 additions & 0 deletions src/commands/makePublic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export async function makePublic (resource: { item: Item }) {
'公開範囲を公開に変更しました',
));
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

return handleErrorMessage(error);
}
}
6 changes: 6 additions & 0 deletions src/commands/openItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export const updater = async (item: Item, document: TextDocument) => {
'投稿を更新しました',
));
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

handleErrorMessage(error);
}
};
Expand Down Expand Up @@ -71,6 +74,9 @@ export function openItem (storagePath?: string) {
}
});
} catch (error) {
// tslint:disable-next-line:no-console
console.warn(error);

window.showErrorMessage(localize(
'commands.openItem.failure.fallback',
'ファイルの表示に失敗しました。指定された投稿は存在しない可能性があります。',
Expand Down