Show error in output instead of exception
This commit is contained in:
parent
7565d6ff01
commit
30fb38f52e
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue