CruceGame  v0.4.0
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
errors.h
Go to the documentation of this file.
1 
8 #ifndef ERRORS_H
9 #define ERRORS_H
10 
11 #include "platform.h"
12 
18 enum ERROR_CODE {
19  NO_ERROR = 0,
20 
21  POINTER_NULL = -1,
22  MALLOC_ERROR = -2,
23 
24  CARD_NULL = -3,
25  DECK_NULL = -4,
26  PLAYER_NULL = -5,
27  TEAM_NULL = -6,
28 
29  TEAM_FULL = -7,
30  TEAM_EMPTY = -8,
31 
32  DUPLICATE = -9,
33  NOT_FOUND = -10,
34 
35  ROUND_NULL = -11,
36  HAND_NULL = -12,
37 
38  ILLEGAL_VALUE = -13,
39 
40  FULL = -14,
41  ERROR_COMPARE = -15,
42 
43  HAND_EMPTY = -16,
44  DECK_EMPTY = -17,
45 
47  LESS_CARDS = -19,
48 
49  GAME_NULL = -20,
50  ROUND_EMPTY = -21,
51  GAME_EMPTY = -22,
52 
54 };
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
67 EXPORT const char *error(const int error_code);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif
74 
There is one more player with this name.
Definition: errors.h:53
The value of the argument that should point to a Game is equal to NULL.
Definition: errors.h:49
EXPORT const char * error(const int error_code)
Returns the error code text of the error code given.
Definition: errors.c:8
The deck of the current player is NULL.
Definition: errors.h:25
There is no place left for one more player or hand.
Definition: errors.h:40
There is one more player or card with that name.
Definition: errors.h:32
An attempt to operate on a team that has no members.
Definition: errors.h:30
The bid's value o the player's id is not a valid one.
Definition: errors.h:38
In this context, the number of players is not big enough.
Definition: errors.h:46
Contains platform specific definitions.
The item you are operating on was not found.
Definition: errors.h:33
ERROR_CODE
Specifies the error codes used to specify the wrong behaviour of the functions used in the game...
Definition: errors.h:18
The value of the argument that is supposed to point to a Round is equal to NULL.
Definition: errors.h:35
This error status is encountered when malloc faild to allocate memory.
Definition: errors.h:22
The value of the variable that points to a Player is equal to NULL.
Definition: errors.h:26
There are no free spaces in the current team.
Definition: errors.h:29
Can't distriute cards from an empty deck.
Definition: errors.h:44
The player's card is NULL.
Definition: errors.h:24
There are no players in a game.
Definition: errors.h:51
The parameter of the function is NULL.
Definition: errors.h:21
There are no players in a round.
Definition: errors.h:50
In this context, the values you are trying to compare are illegal.
Definition: errors.h:41
The value of the argument that points to a Team is equal to NULL.
Definition: errors.h:27
The current hand is empty.
Definition: errors.h:43
The operation can't be completed due to the insufficient number of cards.
Definition: errors.h:47
Normal behaviour, no error is recieved.
Definition: errors.h:19
The value of the argument that is supposed to point to a Hand is equal to NULL.
Definition: errors.h:36