Skip to content

Commit

Permalink
🔧 chore(extension): 移除配置验证并优化错误处理格式
Browse files Browse the repository at this point in the history
- 删除扩展激活时的配置验证逻辑
- 调整错误提示参数的换行格式,提高可读性
  • Loading branch information
littleCareless committed Dec 11, 2024
1 parent 791cb75 commit 28662ab
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,15 @@ export function activate(context: vscode.ExtensionContext) {
// 初始化配置管理器并添加到订阅列表
context.subscriptions.push(ConfigurationManager.getInstance());

// 在扩展激活时验证配置
ConfigurationManager.getInstance()
.validateConfiguration()
.then((isValid) => {
if (!isValid) {
console.log("Configuration validation failed");
}
});

// 注册所有命令
registerCommands(context);
} catch (e) {
console.error("Error activating extension:", e);
// 添加用户可见的错误提示
NotificationHandler.error("extension.activation.failed", e instanceof Error ? e.message : String(e));
NotificationHandler.error(
"extension.activation.failed",
e instanceof Error ? e.message : String(e)
);
throw e;
}
}
Expand Down

0 comments on commit 28662ab

Please sign in to comment.