src/ErrorsMessages.c
/*
 *  FUNCTION NAME: printErrorUsersActions
 *
 *  DESCRIPTION:
 *  Function prints a proper message that depends
 *  upon the value of error_number.
 */
FUNCTION NAME: printErrorUsersActions
DESCRIPTION:
Function prints a proper message that depends
upon the value of error_number.
FUNCTION NAME : printErrorUsersActions DESCRIPTION : Function prints a proper message that depends upon the value of error_number .
void printErrorUsersActions(programError_t error_code)
{
    if (error_code == CONNECTION_ALREADY_IN_GRAPH) {
        fputs("\nConnection is already in the graph!\n\n", stderr);
        return;
    } else if (error_code == CITY_ALREADY_IN_GRAPH) {
        fputs("\nThis city is already in the graph!\n\n", stderr);
    } else if (error_code == EMPTY_GRAPH) {
        fputs("\nGraph is empty! Add some connections first...\n\n", stderr);
    } else if (error_code == INCORRECT_DISTANCE) {
        fputs("\nIncorrect distance!\n\n", stderr);
        return;
    } else if (error_code == INCORRECT_NAME) {
        fputs("\nCity's name can only contain the ISO basic "
              "Latin alphabet signs!\n\n",
            stderr);
        return;
    } else if (error_code == NO_SUCH_CITY) {
        fputs("\nError! There is no such city in the graph!\n\n", stderr);
    } else if (error_code == NO_SUCH_CONNECTION) {
        fputs("\nThere is no such connection in the graph!\n\n", stderr);
    } else if (error_code == NO_DIGIT) {
        fputs("\nYou have to type in a digit!\n\n", stderr);
        return;
    } else if (error_code == NO_ERROR)
        return;
    else if (error_code == IDENTICAL_NAMES) {
        fputs("\nNames can't be identical!\n\n", stderr);
        return;
    } else if (error_code == TOO_MANY_SIGNS) {
        fputs("\nYou can only type in 1 sign!\n\n", stderr);
        return;
    }
}
void printErrorUsersActions ( programError_t error_code ) { if ( error_code == CONNECTION_ALREADY_IN_GRAPH ) { fputs ( " \n \n \n " , stderr ) ; return ; } else if ( error_code == CITY_ALREADY_IN_GRAPH ) { fputs ( " \n \n \n " , stderr ) ; } else if ( error_code == EMPTY_GRAPH ) { fputs ( " \n \n \n " , stderr ) ; } else if ( error_code == INCORRECT_DISTANCE ) { fputs ( " \n \n \n " , stderr ) ; return ; } else if ( error_code == INCORRECT_NAME ) { fputs ( " \n " " \n \n " , stderr ) ; return ; } else if ( error_code == NO_SUCH_CITY ) { fputs ( " \n \n \n " , stderr ) ; } else if ( error_code == NO_SUCH_CONNECTION ) { fputs ( " \n \n \n " , stderr ) ; } else if ( error_code == NO_DIGIT ) { fputs ( " \n \n \n " , stderr ) ; return ; } else if ( error_code == NO_ERROR ) return ; else if ( error_code == IDENTICAL_NAMES ) { fputs ( " \n \n \n " , stderr ) ; return ; } else if ( error_code == TOO_MANY_SIGNS ) { fputs ( " \n \n \n " , stderr ) ; return ; } }
FUNCTION NAME: printErrorUsersActions
  DESCRIPTION:
  Function prints a proper message that depends
  upon the value of error_number.
FUNCTION NAME : printErrorUsersActions DESCRIPTION : Function prints a proper message that depends upon the value of error_number .