diff --git a/api/mosquitto/data/mosquitto.db b/api/mosquitto/data/mosquitto.db index 91abb73f..d4d2eaab 100644 Binary files a/api/mosquitto/data/mosquitto.db and b/api/mosquitto/data/mosquitto.db differ diff --git a/rpi/controllers/GameController.py b/rpi/controllers/GameController.py index b7bb8336..f648cfdb 100644 --- a/rpi/controllers/GameController.py +++ b/rpi/controllers/GameController.py @@ -36,7 +36,6 @@ class GameController: self._game_service.start(white_name, black_name, time_control, increment) self._has_started = True return jsonify({"status": "ok", "message": "Game started"}), 200 - except ServiceException as ex: return jsonify({"status": "error", "message": f"An error occurred : {ex}"}), 400 except Exception as ex: diff --git a/rpi/services/game_service.py b/rpi/services/game_service.py index bb85a991..085a8a97 100644 --- a/rpi/services/game_service.py +++ b/rpi/services/game_service.py @@ -29,12 +29,9 @@ class GameService: def make_move(self) -> tuple[bytes, str] | None: try : if not self._has_started : - raise ServiceException("Game hasn't started yet.") + raise Exception("Game hasn't started yet.") self._clock_service.switch() return self._detection_service.analyze_single_frame() - except ServiceException as se: - print(se) - return None - except Exception as ex: - print(ex) - return None \ No newline at end of file + except Exception as e: + print(e) + raise ServiceException(e)