ev3duder  0.3.0
EV3 Downloader/Uploader
error.h
Go to the documentation of this file.
1 
8 #ifndef EV3DUDER_ERROR_H
9 #define EV3DUDER_ERROR_H
10 #undef EXTERN
11 #ifdef MAIN
13 #define EXTERN
14 #else
15 #define EXTERN extern
16 #endif
17 
18 #include "defs.h"
22 enum {VM_OK = 0x03, VM_ERROR = 0x05};
23 
25 EXTERN const char *errmsg;
26 
31 enum {
32  SUCCESS = 0,
45 
47 };
52 EXTERN const char * const ev3_error_msgs[ERRORS_END + 1]
53 #ifdef MAIN
54 = {
55  [SUCCESS] = "SUCCESS",
56  [UNKNOWN_HANDLE] = "UNKNOWN_HANDLE: Path doesn't exist",
57  [HANDLE_NOT_READY] = "HANDLE_NOT_READY",
58  [CORRUPT_FILE] = "CORRUPT_FILE",
59  [NO_HANDLES_AVAILABLE] = "NO_HANDLES_AVAILABLE: Path doesn't resolve to a valid file",
60  [NO_PERMISSION] = "NO_PERMISSION: File doesn't exist",
61  [ILLEGAL_PATH] = "ILLEGAL_PATH",
62  [FILE_EXITS] = "FILE_EXITS",
63  [END_OF_FILE] = "END_OF_FILE",
64  [SIZE_ERROR] = "SIZE_ERROR: Can't write here. Is SD Card properly inserted?",
65  [UNKNOWN_ERROR] = "UNKNOWN_ERROR: No such directory",
66  [ILLEGAL_FILENAME] = "ILLEGAL_FILENAME",
67  [ILLEGAL_CONNECTION] = "ILLEGAL_CONNECTION",
68  [ERRORS_END] = NULL,
69 }
70 #endif
71 ;
72 
73 #endif
74 
Definition: error.h:20
Definition: error.h:20
ERR
Errors returnable from main.
Definition: error.h:20
Definition: error.h:20
Definition: error.h:20
EXTERN const char *const ev3_error_msgs[ERRORS_END+1]
Definition: error.h:71
Definition: error.h:22
Definition: error.h:20
#define EXTERN
For avoiding the need to separately define and declare stuff.
Definition: error.h:15
Definition: error.h:20
Definition: error.h:32
Definition: error.h:20
Definition: error.h:22
EXTERN const char * errmsg
global variable for last error message
Definition: error.h:25