fix for correct error reporting
This commit is contained in:
parent
2f355c233f
commit
463e68a611
@ -69,8 +69,12 @@ class SnippetFileSource(SnippetSource):
|
|||||||
if ft in self._snippets:
|
if ft in self._snippets:
|
||||||
del self._snippets[ft]
|
del self._snippets[ft]
|
||||||
del self._extends[ft]
|
del self._extends[ft]
|
||||||
|
try:
|
||||||
for fn in self._files_for_ft[ft]:
|
for fn in self._files_for_ft[ft]:
|
||||||
self._parse_snippets(ft, fn)
|
self._parse_snippets(ft, fn)
|
||||||
|
except:
|
||||||
|
del self._files_for_ft[ft]
|
||||||
|
raise
|
||||||
# Now load for the parents
|
# Now load for the parents
|
||||||
for parent_ft in self.get_deep_extends([ft]):
|
for parent_ft in self.get_deep_extends([ft]):
|
||||||
if parent_ft != ft and self._needs_update(parent_ft):
|
if parent_ft != ft and self._needs_update(parent_ft):
|
||||||
|
@ -101,3 +101,15 @@ class ContextSnippets_PriorityKeyword(_VimTest):
|
|||||||
|
|
||||||
keys = "i" + EX
|
keys = "i" + EX
|
||||||
wanted = "b"
|
wanted = "b"
|
||||||
|
|
||||||
|
|
||||||
|
class ContextSnippets_ReportError(_VimTest):
|
||||||
|
files = { 'us/all.snippets': r"""
|
||||||
|
snippet e "desc" "Tru" e
|
||||||
|
error
|
||||||
|
endsnippet
|
||||||
|
"""}
|
||||||
|
|
||||||
|
keys = "e" + EX
|
||||||
|
wanted = "e" + EX
|
||||||
|
expected_error = r"NameError: name 'Tru' is not defined"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user