aboutsummaryrefslogtreecommitdiffstats
path: root/python/vhdl_langserver
diff options
context:
space:
mode:
Diffstat (limited to 'python/vhdl_langserver')
-rw-r--r--python/vhdl_langserver/lsp.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/python/vhdl_langserver/lsp.py b/python/vhdl_langserver/lsp.py
index 983b3005e..8f5a98e5e 100644
--- a/python/vhdl_langserver/lsp.py
+++ b/python/vhdl_langserver/lsp.py
@@ -113,7 +113,20 @@ class LanguageProtocolServer(object):
if fmethod:
if params is None:
params = {}
- response = fmethod(**params)
+ try:
+ response = fmethod(**params)
+ except Exception as e:
+ log.exception(
+ "Caught exception while handling %s with params %s:",
+ method, params
+ )
+ self.show_message(
+ MessageType.Error,
+ ("Caught exception while handling {}, " +
+ "see VHDL language server output for details.").format(
+ method)
+ )
+ response = None
if tid is None:
# If this was just a notification, discard it
return None