提交 7d4a2539 编写于 作者: M Matt Bierner

Have fallback message when code aciton command fails for unknown reason

上级 b17e5587
...@@ -130,9 +130,11 @@ export async function applyCodeAction( ...@@ -130,9 +130,11 @@ export async function applyCodeAction(
await commandService.executeCommand(action.command.id, ...(action.command.arguments || [])); await commandService.executeCommand(action.command.id, ...(action.command.arguments || []));
} catch (err) { } catch (err) {
const message = asMessage(err); const message = asMessage(err);
if (typeof message === 'string') { notificationService.error(
notificationService.error(message); typeof message === 'string'
} ? message
: nls.localize('applyCodeActionFailed', "An unknown error occurred while applying the code action"));
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册