-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.c
40 lines (35 loc) · 996 Bytes
/
errors.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "errors.h"
#include <stdlib.h>
#include <stdio.h>
void showError(enum errors code){
printf("\033[0;31m");
switch(code){
case ERROR_NOT_INITIALICED_VARIABLE:
printf("you can't use a not initialiced variable.");
break;
case ERROR_OVERWITE:
printf("you can only overwrite variables.");
break;
case ERROR_MISSMATCHING_BRACKETS:
printf("miss matching brackets,");
break;
case ERROR_WRONG_OPERATOR:
printf("wrong operator.");
break;
case ERROR_DIVISION_BY_ZERO:
printf("you can't divide by zero.");
break;
case ERROR_NOT_A_FUNCTION:
printf("Not a valid function.");
break;
case ERROR_FILE_NOT_EXISTS:
printf("Invalid path to file.");
break;
case ERROR_VALUE_OF_FUNCTION:
printf("You can't check the value of a function");
break;
default:
printf("Unknown Error");
}
printf("\033[0m\n");
}