libnjb  2.2.7
njb_error.h
1 #ifndef __NJB__ERROR__H
2 #define __NJB__ERROR__H
3 
4 #include <stdio.h>
5 #include "libnjb.h"
6 
11 #define EO_USBCTL 1
12 #define EO_USBBLK 2
13 #define EO_RDSHORT 3
14 #define EO_NOMEM 4
15 #define EO_BADDATA 5
16 #define EO_EOM 6
17 #define EO_BADSTATUS 7
18 #define EO_BADNJBID 8
19 #define EO_BADCOUNT 9
20 #define EO_WRSHORT 10
21 #define EO_NULLTMP 11
22 #define EO_TOOBIG 12
23 #define EO_CANTMOVE 13
24 #define EO_TIMEOUT 14
25 #define EO_ABORTED 15
26 #define EO_EOF 16
27 #define EO_DEVICE 17
28 #define EO_INIT 18
29 #define EO_TMPFILE 19
30 #define EO_XFERDENIED 20
31 #define EO_WRFILE 21
32 #define EO_XFERERROR 22
33 #define EO_SRCFILE 23
34 #define EO_INVALID 24
35 #define EO_AGAIN 25
36 #define EO_BAD_NJB1_REPLACE 26
39 #define MAX_ERRLEN 128
40 #define MAX_ERRORS 16
41 
47  int idx;
48  int count;
49  char **msg;
50 };
51 
52 void initialize_errorstack(njb_t *njb);
53 void destroy_errorstack(njb_t *njb);
54 void njb_error_add (njb_t *njb, const char *sub, int err);
55 void njb_error_add2 (njb_t *njb, const char *sub, const char *prefix, int err);
56 void njb_error_add3 (njb_t *njb, const char *sub, const char *prefix, const
57  char *suffix, int err);
58 void njb_error_add_string (njb_t *njb, const char *sub, const char* error);
59 void njb_error_clear (njb_t *njb);
60 
61 #define NJB_ERROR(a,b) njb_error_add(a,subroutinename,b)
62 #define NJB_ERROR2(a,b,c) njb_error_add2(a,subroutinename,b,c)
63 #define NJB_ERROR3(a,b,c,d) njb_error_add3(a,subroutinename,b,c,d)
64 
65 #endif
66 
libnjb.h
NJB_Error_Pending
int NJB_Error_Pending(njb_t *njb)
Definition: njb_error.c:303
EO_TOOBIG
#define EO_TOOBIG
Definition: njb_error.h:22
njb_struct
Definition: libnjb.h:182
EO_DEVICE
#define EO_DEVICE
Definition: njb_error.h:27
EO_CANTMOVE
#define EO_CANTMOVE
Definition: njb_error.h:23
EO_BADSTATUS
#define EO_BADSTATUS
Definition: njb_error.h:17
EO_AGAIN
#define EO_AGAIN
Definition: njb_error.h:35
EO_BADDATA
#define EO_BADDATA
Definition: njb_error.h:15
EO_EOM
#define EO_EOM
Definition: njb_error.h:16
NJB_Error_Reset_Geterror
void NJB_Error_Reset_Geterror(njb_t *njb)
Definition: njb_error.c:342
EO_TMPFILE
#define EO_TMPFILE
Definition: njb_error.h:29
EO_SRCFILE
#define EO_SRCFILE
Definition: njb_error.h:33
EO_USBBLK
#define EO_USBBLK
Definition: njb_error.h:12
EO_NOMEM
#define EO_NOMEM
Definition: njb_error.h:14
njb_error_stack_struct::count
int count
Definition: njb_error.h:48
EO_USBCTL
#define EO_USBCTL
Definition: njb_error.h:11
njb_error_stack_struct
Definition: njb_error.h:46
EO_INIT
#define EO_INIT
Definition: njb_error.h:28
EO_BADNJBID
#define EO_BADNJBID
Definition: njb_error.h:18
njb_struct::error_stack
void * error_stack
Definition: libnjb.h:193
EO_EOF
#define EO_EOF
Definition: njb_error.h:26
EO_XFERDENIED
#define EO_XFERDENIED
Definition: njb_error.h:30
EO_RDSHORT
#define EO_RDSHORT
Definition: njb_error.h:13
NJB_Error_Geterror
const char * NJB_Error_Geterror(njb_t *njb)
Definition: njb_error.c:368
EO_WRFILE
#define EO_WRFILE
Definition: njb_error.h:31
EO_NULLTMP
#define EO_NULLTMP
Definition: njb_error.h:21
__sub_depth
int __sub_depth
Definition: base.c:62
EO_WRSHORT
#define EO_WRSHORT
Definition: njb_error.h:20
EO_BAD_NJB1_REPLACE
#define EO_BAD_NJB1_REPLACE
Definition: njb_error.h:36
njb_error_stack_struct::idx
int idx
Definition: njb_error.h:47
EO_INVALID
#define EO_INVALID
Definition: njb_error.h:34
EO_TIMEOUT
#define EO_TIMEOUT
Definition: njb_error.h:24
NJB_Error_Dump
void NJB_Error_Dump(njb_t *njb, FILE *fp)
Definition: njb_error.c:418
EO_BADCOUNT
#define EO_BADCOUNT
Definition: njb_error.h:19
njb_error_stack_struct::msg
char ** msg
Definition: njb_error.h:49
EO_ABORTED
#define EO_ABORTED
Definition: njb_error.h:25
EO_XFERERROR
#define EO_XFERERROR
Definition: njb_error.h:32