Skip to content

Commit b385f66

Browse files
committed
Prevent failing to load all configs when one fails
1 parent 2be06be commit b385f66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/core/configurations.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .logging import debug
2+
from .logging import exception_log
23
from .types import ClientConfig
34
from .typing import Generator, List, Optional, Set, Dict
45
from .workspace import enable_in_project, disable_in_project
@@ -72,7 +73,10 @@ def update(self, updated_config_name: Optional[str] = None) -> None:
7273
if updated_config_name and updated_config_name != name:
7374
continue
7475
debug("loading project-only configuration", name)
75-
self.all[name] = ClientConfig.from_dict(name, c)
76+
try:
77+
self.all[name] = ClientConfig.from_dict(name, c)
78+
except Exception as ex:
79+
exception_log("failed to load project-only configuration {}".format(name), ex)
7680
self._window.run_command("lsp_recheck_sessions", {'config_name': updated_config_name})
7781

7882
def enable_config(self, config_name: str) -> None:

0 commit comments

Comments
 (0)