/nix/store/i1aar97n7b4yf8rk94p66if25brfvvdx-gqvzl8a5pvrg3xj44q0msrndcripi8dk-source/src/statefunctions/gamestates/error.cc
Line | Count | Source |
1 | | #include <iostream> |
2 | | #include <memory> |
3 | | |
4 | | #include "statefunctions/router.h" |
5 | | #include "types/gamestate.h" |
6 | | #include "types/statefunction.h" |
7 | | |
8 | | namespace mahjong { |
9 | | struct GameState; |
10 | | |
11 | | namespace { |
12 | 0 | std::unique_ptr<GameState> Error(std::unique_ptr<GameState> state) { |
13 | 0 | std::cerr << "ERROR STATE REACHED" << '\n'; |
14 | 0 | std::cerr << "GameState: " << '\n'; |
15 | 0 | std::cerr << state; |
16 | 0 | throw "ERROR STATE REACHED"; |
17 | 0 | } |
18 | | } // namespace |
19 | | |
20 | | REGISTER_ROUTE(Error, StateFunctionType::kError); |
21 | | } // namespace mahjong |