augmented type autogeneration for enums removed direct error reporting.
* gentest.py testapi.c: augmented type autogeneration for enums
* xpath.c include/libxml/xpath.h: removed direct error reporting.
Daniel
diff --git a/xpath.c b/xpath.c
index 2a7bb32..8076b3c 100644
--- a/xpath.c
+++ b/xpath.c
@@ -207,7 +207,8 @@
"Sub resource error\n",
"Undefined namespace prefix\n",
"Encoding error\n",
- "Char out of XML range\n"
+ "Char out of XML range\n",
+ "Invalid or inclomplete context\n"
};
@@ -3928,24 +3929,11 @@
#define CHECK_CONTEXT(ctxt) \
- if (ctxt == NULL) { \
- xmlGenericError(xmlGenericErrorContext, \
- "%s:%d Internal error: no context\n", \
- __FILE__, __LINE__); \
+ if ((ctxt == NULL) || (ctxt->doc == NULL) || \
+ (ctxt->doc->children == NULL)) { \
+ xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_INVALID_CTXT); \
return(NULL); \
- } \
- else if (ctxt->doc == NULL) { \
- xmlGenericError(xmlGenericErrorContext, \
- "%s:%d Internal error: no document\n", \
- __FILE__, __LINE__); \
- return(NULL); \
- } \
- else if (ctxt->doc->children == NULL) { \
- xmlGenericError(xmlGenericErrorContext, \
- "%s:%d Internal error: document without root\n", \
- __FILE__, __LINE__); \
- return(NULL); \
- } \
+ }
/**