aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorHenning Holm <git@henningholm.de>2020-07-28 11:36:55 +0200
committertgingold <tgingold@users.noreply.github.com>2020-07-30 05:13:09 +0200
commit9f60223b124a74d6b6afc857215249714c41207f (patch)
treefe0f8b6be7459e5be5810802ff8dd8c929ddaca6 /python
parent574ac8b17b41462bc110de57934ce17ba9837581 (diff)
downloadghdl-9f60223b124a74d6b6afc857215249714c41207f.tar.gz
ghdl-9f60223b124a74d6b6afc857215249714c41207f.tar.bz2
ghdl-9f60223b124a74d6b6afc857215249714c41207f.zip
Revert "ghdl-ls: Fix exception crashing language server"
This reverts commit eddb55e8a14e6c40b66ce018b7760767981af79d.
Diffstat (limited to 'python')
-rw-r--r--python/vhdl_langserver/symbols.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/python/vhdl_langserver/symbols.py b/python/vhdl_langserver/symbols.py
index 5d3c35dd9..b39827bed 100644
--- a/python/vhdl_langserver/symbols.py
+++ b/python/vhdl_langserver/symbols.py
@@ -1,4 +1,3 @@
-import logging
import libghdl.thin.name_table as name_table
import libghdl.thin.files_map as files_map
import libghdl.thin.vhdl.pyutils as pyutils
@@ -8,8 +7,6 @@ import libghdl.thin.vhdl.elocations as elocations
from . import lsp
-log = logging.getLogger(__name__)
-
SYMBOLS_MAP = {
nodes.Iir_Kind.Package_Declaration: {'kind': lsp.SymbolKind.Package, 'detail': '(declaration)'},
nodes.Iir_Kind.Package_Body: {'kind': lsp.SymbolKind.Package, 'detail': '(body)'},
@@ -88,8 +85,7 @@ def get_symbols(fe, n):
return get_symbols(fe, nodes.Get_Library_Unit(n))
m = SYMBOLS_MAP.get(k, None)
if m is None:
- log.error("get_symbol: unhandled {}".format(pyutils.kind_image(k)))
- return None
+ raise AssertionError("get_symbol: unhandled {}".format(pyutils.kind_image(k)))
kind = m['kind']
if kind is None:
return None