Show error in output instead of exception

This commit is contained in:
cuom1999 2023-04-28 20:53:54 -05:00
parent 7565d6ff01
commit 30fb38f52e

View file

@ -335,7 +335,9 @@ def get_problem_case(problem, files):
if next_char: if next_char:
s += next_char s += next_char
else: else:
raise Exception("File %s is not able to decode in utf-8" % file) s = f"File {file} is not able to decode in utf-8"
s = s.encode("utf-8")
break
qs = get_visible_content(s) qs = get_visible_content(s)
cache.set(cache_key, qs, 86400) cache.set(cache_key, qs, 86400)
result[file] = qs result[file] = qs