From 70ff03a6cd9032b091312cfc66049c39684e8330 Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Sat, 6 Nov 2021 21:33:10 +0300 Subject: [PATCH] exceptions --- Main/management/commands/receive.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Main/management/commands/receive.py b/Main/management/commands/receive.py index 46f278e..c520639 100644 --- a/Main/management/commands/receive.py +++ b/Main/management/commands/receive.py @@ -20,11 +20,13 @@ class Command(BaseCommand): id = int(str(body, encoding='utf-8')) print(f"Received id {id}") solution = Solution.objects.get(id=id) - except: + except Exception as e: + print(e) return try: eval(solution.language.work_name + 'Tester')(solution).execute() - except: + except Exception as e: + print(e) solution.result = 'TE' solution.save()