catch possible error

This commit is contained in:
Maximilian Keßler 2022-02-05 18:55:28 +01:00
parent b38c01cb0c
commit 89f4bcbe0b

View file

@ -32,7 +32,10 @@ class PyTeXSourceFile:
return files return files
def format(self) -> Optional[List[Tuple[RelativePath, Dict]]]: def format(self) -> Optional[List[Tuple[RelativePath, Dict]]]:
try:
configs = self._formatter.format(GlobalPyTeXConfig.target_root()) configs = self._formatter.format(GlobalPyTeXConfig.target_root())
except Exception as e:
raise e # TODO
configs = [ configs = [
(self._relative_path.with_name(filename), config) (self._relative_path.with_name(filename), config)
for [filename, config] in configs for [filename, config] in configs