| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2024 | ||
| 3 | ** zappy/ai | ||
| 4 | ** File description: | ||
| 5 | ** ListenConnectNbrResponse.cpp | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include "../../bots/ABot.hpp" | ||
| 9 | |||
| 10 | ✗ | void ABot::listenConnectNbrResponse(const std::string &response) | |
| 11 | { | ||
| 12 | try | ||
| 13 | { | ||
| 14 | ✗ | _state.slot = std::stoi(response); | |
| 15 | } | ||
| 16 | ✗ | catch (std::invalid_argument &e) | |
| 17 | { | ||
| 18 | ✗ | PRINT_ERROR("Invalid argument error: " << e.what()); | |
| 19 | ✗ | } | |
| 20 | ✗ | catch (std::out_of_range &e) | |
| 21 | { | ||
| 22 | ✗ | PRINT_ERROR("Out of range error: " << e.what()); | |
| 23 | ✗ | } | |
| 24 | ✗ | } | |
| 25 |