exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Enumerations | Variables
include/errorHandle.h File Reference
#include "exipConfig.h"
#include <stdio.h>

Go to the source code of this file.

Macros

#define INFO   1
 
#define WARNING   2
 
#define ERROR   3
 
#define DEBUG_CHAR_OUTPUT(character)   do {putchar (character);} while(0)
 
#define DEBUG_OUTPUT(msg)   do {printf msg;} while(0)
 
#define EXIP_DEBUG_LEVEL   INFO
 
#define DEBUG_MSG(level, module, msg)   do { if (level >= EXIP_DEBUG_LEVEL && module == ON) { DEBUG_OUTPUT(msg); } } while(0)
 
#define GET_ERR_STRING(indx)   errorCodeStrings[indx]
 
#define TRY(func)
 
#define TRY_CATCH(func, cblock)
 

Typedefs

typedef enum errorCode errorCode
 

Enumerations

enum  errorCode {
  EXIP_OK = 0, EXIP_NOT_IMPLEMENTED_YET = 1, EXIP_UNEXPECTED_ERROR = 2, EXIP_HASH_TABLE_ERROR = 3,
  EXIP_OUT_OF_BOUND_BUFFER = 4, EXIP_NULL_POINTER_REF = 5, EXIP_MEMORY_ALLOCATION_ERROR = 6, EXIP_INVALID_EXI_HEADER = 7,
  EXIP_INCONSISTENT_PROC_STATE = 8, EXIP_INVALID_EXI_INPUT = 9, EXIP_BUFFER_END_REACHED =10, EXIP_PARSING_COMPLETE =11,
  EXIP_INVALID_EXIP_CONFIGURATION =12, EXIP_NO_PREFIXES_PRESERVED_XML_SCHEMA =13, EXIP_INVALID_STRING_OPERATION =14, EXIP_HEADER_OPTIONS_MISMATCH =15,
  EXIP_HANDLER_STOP =16, EXIP_OK = 0, EXIP_NOT_IMPLEMENTED_YET = 1, EXIP_UNEXPECTED_ERROR = 2,
  EXIP_HASH_TABLE_ERROR = 3, EXIP_OUT_OF_BOUND_BUFFER = 4, EXIP_NULL_POINTER_REF = 5, EXIP_MEMORY_ALLOCATION_ERROR = 6,
  EXIP_INVALID_EXI_HEADER = 7, EXIP_INCONSISTENT_PROC_STATE = 8, EXIP_INVALID_EXI_INPUT = 9, EXIP_BUFFER_END_REACHED =10,
  EXIP_PARSING_COMPLETE =11, EXIP_INVALID_EXIP_CONFIGURATION =12, EXIP_NO_PREFIXES_PRESERVED_XML_SCHEMA =13, EXIP_INVALID_STRING_OPERATION =14,
  EXIP_HEADER_OPTIONS_MISMATCH =15, EXIP_HANDLER_STOP =16
}
 

Variables

const char * errorCodeStrings []
 

Macro Definition Documentation

#define DEBUG_CHAR_OUTPUT (   character)    do {putchar (character);} while(0)

Definition at line 113 of file include/errorHandle.h.

#define DEBUG_MSG (   level,
  module,
  msg 
)    do { if (level >= EXIP_DEBUG_LEVEL && module == ON) { DEBUG_OUTPUT(msg); } } while(0)

Definition at line 125 of file include/errorHandle.h.

#define DEBUG_OUTPUT (   msg)    do {printf msg;} while(0)

Definition at line 118 of file include/errorHandle.h.

#define ERROR   3

Definition at line 25 of file include/errorHandle.h.

#define EXIP_DEBUG_LEVEL   INFO

Definition at line 122 of file include/errorHandle.h.

#define GET_ERR_STRING (   indx)    errorCodeStrings[indx]

Definition at line 197 of file include/errorHandle.h.

#define INFO   1

Definition at line 23 of file include/errorHandle.h.

#define TRY (   func)
Value:
do { tmp_err_code = func;\
if (tmp_err_code != EXIP_OK) { \
DEBUG_MSG(ERROR, EXIP_DEBUG, ("\n>Error %s:%d at %s, line %d", GET_ERR_STRING(tmp_err_code), tmp_err_code, __FILE__, __LINE__)); \
return tmp_err_code; } } while(0)

Definition at line 202 of file include/errorHandle.h.

#define TRY_CATCH (   func,
  cblock 
)
Value:
do { tmp_err_code = func;\
if (tmp_err_code != EXIP_OK) { \
DEBUG_MSG(ERROR, EXIP_DEBUG, ("\n>Error %s:%d at %s, line %d", GET_ERR_STRING(tmp_err_code), tmp_err_code, __FILE__, __LINE__)); \
cblock;\
return tmp_err_code; } } while(0)

Definition at line 207 of file include/errorHandle.h.

#define WARNING   2

Definition at line 24 of file include/errorHandle.h.

Typedef Documentation

typedef enum errorCode errorCode

Definition at line 193 of file include/errorHandle.h.

Enumeration Type Documentation

enum errorCode
Enumerator
EXIP_OK 

No error, everything is OK.

EXIP_NOT_IMPLEMENTED_YET 

The code for this function is not yet implemented.

EXIP_UNEXPECTED_ERROR 

Any error that does not fall into the other categories.

EXIP_HASH_TABLE_ERROR 

Hash table error.

EXIP_OUT_OF_BOUND_BUFFER 

Array out of bound.

EXIP_NULL_POINTER_REF 

Try to access null pointer.

EXIP_MEMORY_ALLOCATION_ERROR 

Unsuccessful memory allocation.

EXIP_INVALID_EXI_HEADER 

Error in the EXI header.

EXIP_INCONSISTENT_PROC_STATE 

Processor state is inconsistent with the stream events.

EXIP_INVALID_EXI_INPUT 

Received EXI value type or event encoding that is invalid according to the specification.

EXIP_BUFFER_END_REACHED 

Buffer end reached.

EXIP_PARSING_COMPLETE 
EXIP_INVALID_EXIP_CONFIGURATION 

The information passed to the EXIP API is invalid.

EXIP_NO_PREFIXES_PRESERVED_XML_SCHEMA 

When encoding XML Schema in EXI the prefixes must be preserved: When qualified namesNS are used in the values of AT or CH events in an EXI Stream, the Preserve.prefixes fidelity option SHOULD be turned on to enable the preservation of the NS prefix declarations used by these values.

Note, in particular among other cases, that this practice applies to the use of xsi:type attributes in EXI streams when Preserve.lexicalValues fidelity option is set to true.

EXIP_INVALID_STRING_OPERATION 
EXIP_HEADER_OPTIONS_MISMATCH 

Mismatch in the header options.

This error can be due to: 1) The "alignment" element MUST NOT appear in an EXI options document when the "compression" element is present; 2) The "strict" element MUST NOT appear in an EXI options document when one of "dtd", "prefixes", "comments", "pis" or "selfContained" element is present in the same options document. That is only the element "lexicalValues", from the fidelity options, is permitted to occur in the presence of "strict" element; 3) The "selfContained" element MUST NOT appear in an EXI options document when one of "compression", "pre-compression" or "strict" elements are present in the same options document. 4) The datatypeRepresentationMap option does not take effect when the value of the Preserve.lexicalValues fidelity option is true (see 6.3 Fidelity Options), or when the EXI stream is a schema-less EXI stream. 5) Presence Bit for EXI Options not set and no out-of-band options set

EXIP_HANDLER_STOP 

Send a signal to the EXIP parser from a content handler callback for gracefully stopping the EXI stream parsing.

EXIP_OK 

No error, everything is OK.

EXIP_NOT_IMPLEMENTED_YET 

The code for this function is not yet implemented.

EXIP_UNEXPECTED_ERROR 

Any error that does not fall into the other categories.

EXIP_HASH_TABLE_ERROR 

Hash table error.

EXIP_OUT_OF_BOUND_BUFFER 

Array out of bound.

EXIP_NULL_POINTER_REF 

Try to access null pointer.

EXIP_MEMORY_ALLOCATION_ERROR 

Unsuccessful memory allocation.

EXIP_INVALID_EXI_HEADER 

Error in the EXI header.

EXIP_INCONSISTENT_PROC_STATE 

Processor state is inconsistent with the stream events.

EXIP_INVALID_EXI_INPUT 

Received EXI value type or event encoding that is invalid according to the specification.

EXIP_BUFFER_END_REACHED 

Buffer end reached.

EXIP_PARSING_COMPLETE 
EXIP_INVALID_EXIP_CONFIGURATION 

The information passed to the EXIP API is invalid.

EXIP_NO_PREFIXES_PRESERVED_XML_SCHEMA 

When encoding XML Schema in EXI the prefixes must be preserved: When qualified namesNS are used in the values of AT or CH events in an EXI Stream, the Preserve.prefixes fidelity option SHOULD be turned on to enable the preservation of the NS prefix declarations used by these values.

Note, in particular among other cases, that this practice applies to the use of xsi:type attributes in EXI streams when Preserve.lexicalValues fidelity option is set to true.

EXIP_INVALID_STRING_OPERATION 
EXIP_HEADER_OPTIONS_MISMATCH 

Mismatch in the header options.

This error can be due to: 1) The "alignment" element MUST NOT appear in an EXI options document when the "compression" element is present; 2) The "strict" element MUST NOT appear in an EXI options document when one of "dtd", "prefixes", "comments", "pis" or "selfContained" element is present in the same options document. That is only the element "lexicalValues", from the fidelity options, is permitted to occur in the presence of "strict" element; 3) The "selfContained" element MUST NOT appear in an EXI options document when one of "compression", "pre-compression" or "strict" elements are present in the same options document. 4) The datatypeRepresentationMap option does not take effect when the value of the Preserve.lexicalValues fidelity option is true (see 6.3 Fidelity Options), or when the EXI stream is a schema-less EXI stream. 5) Presence Bit for EXI Options not set and no out-of-band options set

EXIP_HANDLER_STOP 

Send a signal to the EXIP parser from a content handler callback for gracefully stopping the EXI stream parsing.

Definition at line 132 of file include/errorHandle.h.

Variable Documentation

const char* errorCodeStrings[]

Definition at line 150 of file procTypes.c.