From afac6be8481d18669f9bb0f6ce5be7a17a945ab7 Mon Sep 17 00:00:00 2001 From: Allber Fellype <133912146+JamesStewart314@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:53:10 -0300 Subject: [PATCH] Tratamento de erro durante a abertura do arquivo adicionado --- desafio-11/JamesStewart-314/python/solution.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desafio-11/JamesStewart-314/python/solution.py b/desafio-11/JamesStewart-314/python/solution.py index 4e55b7ccb..ba5e17fd6 100644 --- a/desafio-11/JamesStewart-314/python/solution.py +++ b/desafio-11/JamesStewart-314/python/solution.py @@ -51,4 +51,7 @@ def print_biggest_seq(file_path: str, upper_limit: int = 10 ** 4) -> str: if __name__ == '__main__': file_path: str = os.path.join(os.path.dirname(__file__), "pi-1M.txt") - print_biggest_seq(file_path) + try: + print_biggest_seq(file_path) + except Exception as error: + print(error)