This file contains definitions of the symbolic constants that represents error codes, as wel the declarations of the functions that belongs to the error module. More...
#include "platform.h"Go to the source code of this file.
Enumerations | |
| enum | ERROR_CODE { NO_ERROR = 0, POINTER_NULL = -1, MALLOC_ERROR = -2, CARD_NULL = -3, DECK_NULL = -4, PLAYER_NULL = -5, TEAM_NULL = -6, TEAM_FULL = -7, TEAM_EMPTY = -8, DUPLICATE = -9, NOT_FOUND = -10, ROUND_NULL = -11, HAND_NULL = -12, ILLEGAL_VALUE = -13, FULL = -14, ERROR_COMPARE = -15, HAND_EMPTY = -16, DECK_EMPTY = -17, INSUFFICIENT_PLAYERS = -18, LESS_CARDS = -19, GAME_NULL = -20, ROUND_EMPTY = -21, GAME_EMPTY = -22, DUPLICATE_NAME = -23 } |
| Specifies the error codes used to specify the wrong behaviour of the functions used in the game. More... | |
Functions | |
| EXPORT const char * | error (const int error_code) |
| Returns the error code text of the error code given. More... | |
This file contains definitions of the symbolic constants that represents error codes, as wel the declarations of the functions that belongs to the error module.
| enum ERROR_CODE |
Specifies the error codes used to specify the wrong behaviour of the functions used in the game.
| Enumerator | |
|---|---|
| NO_ERROR |
Normal behaviour, no error is recieved. |
| POINTER_NULL |
The parameter of the function is NULL. |
| MALLOC_ERROR |
This error status is encountered when malloc faild to allocate memory. |
| CARD_NULL |
The player's card is NULL. |
| DECK_NULL |
The deck of the current player is NULL. |
| PLAYER_NULL |
The value of the variable that points to a Player is equal to NULL. |
| TEAM_NULL |
The value of the argument that points to a Team is equal to NULL. |
| TEAM_FULL |
There are no free spaces in the current team. |
| TEAM_EMPTY |
An attempt to operate on a team that has no members. |
| DUPLICATE |
There is one more player or card with that name. |
| NOT_FOUND |
The item you are operating on was not found. |
| ROUND_NULL |
The value of the argument that is supposed to point to a Round is equal to NULL. |
| HAND_NULL |
The value of the argument that is supposed to point to a Hand is equal to NULL. |
| ILLEGAL_VALUE |
The bid's value o the player's id is not a valid one. |
| FULL |
There is no place left for one more player or hand. |
| ERROR_COMPARE |
In this context, the values you are trying to compare are illegal. |
| HAND_EMPTY |
The current hand is empty. |
| DECK_EMPTY |
Can't distriute cards from an empty deck. |
| INSUFFICIENT_PLAYERS |
In this context, the number of players is not big enough. |
| LESS_CARDS |
The operation can't be completed due to the insufficient number of cards. |
| GAME_NULL |
The value of the argument that should point to a Game is equal to NULL. |
| ROUND_EMPTY |
There are no players in a round. |
| GAME_EMPTY |
There are no players in a game. |
| DUPLICATE_NAME |
There is one more player with this name. |
| EXPORT const char* error | ( | const int | error_code | ) |
Returns the error code text of the error code given.
| error_code | The error code value as integer type. |
1.8.6