working test

This commit is contained in:
Paul Gauthier 2023-07-06 10:55:38 -07:00
parent 391088fd14
commit 3c443d68d0
3 changed files with 38 additions and 2 deletions

View file

@ -141,7 +141,10 @@ class InputOutput:
try:
with open(str(filename), "r", encoding=self.encoding) as f:
return f.read()
except (FileNotFoundError, UnicodeError) as e:
except FileNotFoundError:
self.tool_error(f"{filename}: file not found error")
return
except UnicodeError as e:
self.tool_error(f"{filename}: {e}")
return