Merge branch 'main' into mypy_on_solidlsp

Conflicts:
	src/solidlsp/language_servers/elixir_tools/elixir_tools.py
	src/solidlsp/language_servers/gopls.py
	src/solidlsp/language_servers/terraform_ls.py
	src/solidlsp/ls.py
	src/solidlsp/ls_handler.py
This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2025-11-19 22:10:16 +01:00
commit 11cb8f2811
155 files changed
+11240 -2829

No files matched your search

+12
View File
@@ -2,6 +2,8 @@
This module contains the exceptions raised by the framework.
"""
from solidlsp.ls_config import Language
class SolidLSPException(Exception):
def __init__(self, message: str, cause: Exception | None = None) -> None:
@@ -26,6 +28,16 @@ class SolidLSPException(Exception):
return isinstance(self.cause, LanguageServerTerminatedException)
def get_affected_language(self) -> Language | None:
"""
:return: the affected language for the case where the exception is caused by the language server having terminated
"""
from .ls_handler import LanguageServerTerminatedException
if isinstance(self.cause, LanguageServerTerminatedException):
return self.cause.language
return None
def __str__(self) -> str:
"""
Returns a string representation of the exception.