Skip to content

Commit

Permalink
refactor: Handle the error of the launcher plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Nov 7, 2023
1 parent da83a3c commit 23fbec2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xmcl-runtime/lib/app/LauncherApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ export class LauncherApp extends EventEmitter {
this.launcherAppManager = new LauncherAppManager(this)

for (const plugin of plugins.concat(_plugins)) {
plugin(this, builtinAppManifest, services)
try {
plugin(this, builtinAppManifest, services)
} catch {
this.logger.warn(`Fail to load plugin ${plugin.name}`)
}
}

this.managers = [this.taskManager, this.serviceStateManager, this.semaphoreManager, this.launcherAppManager]
Expand Down

0 comments on commit 23fbec2

Please sign in to comment.