-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrorHandling.c
More file actions
40 lines (37 loc) · 850 Bytes
/
Copy patherrorHandling.c
File metadata and controls
40 lines (37 loc) · 850 Bytes
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 <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "general.h"
#include "errorHandling.h"
#include "tft.h"
void errorHandler(int ErrorNumber){
TFT_set_font_color(RED);
TFT_gotoxy(1,14);
if(ErrorNumber != EOK){
switch(ErrorNumber){
case ARRAYINDEXOUTOFBOUNDS:
TFT_puts("Array index out of Bounds");
break;
case ILLEGALSTATE:
TFT_puts("IllegalStateException");
break;
case NULLPOINTER:
TFT_puts("Null Pointer übergabe");
break;
case ILLEGALARGUMENT:
TFT_puts("Illegal Argument exception");
break;
case NOSENSOR:
TFT_puts("No Sensor detected");
break;
case ROMREADERROR:
TFT_puts("ERROR while reading ROM codes");
break;
case INVALIDCRC:
TFT_puts("Problem while receiving data.. CRC Error");
break;
default:
TFT_puts("Unknown Error");
}
}
}