From d9580c4e391292314723f34b47ab4a36e483e62d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 8 Mar 2013 15:24:08 +0200 Subject: Cleanup error messages --- genx.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/genx.c b/genx.c index af9cb76..91b0e50 100644 --- a/genx.c +++ b/genx.c @@ -573,29 +573,28 @@ genxWriter genxNew(genxAlloc alloc, genxDealloc dealloc, void * userData) genxSetCharProps(w->xmlChars); - w->etext[GENX_SUCCESS] = "Success"; - w->etext[GENX_BAD_UTF8] = "Bad UTF8"; - w->etext[GENX_NON_XML_CHARACTER] = "Non XML Character"; - w->etext[GENX_BAD_NAME] = "Bad NAME"; - w->etext[GENX_ALLOC_FAILED] = "Memory allocation failed"; - w->etext[GENX_BAD_NAMESPACE_NAME] = "Bad namespace name"; - w->etext[GENX_INTERNAL_ERROR] = "Internal error"; - w->etext[GENX_DUPLICATE_PREFIX] = "Duplicate prefix"; - w->etext[GENX_SEQUENCE_ERROR] = "Call out of sequence"; - w->etext[GENX_NO_START_TAG] = "No Start-tag for EndElement call"; - w->etext[GENX_IO_ERROR] = "I/O error"; - w->etext[GENX_MISSING_VALUE] = "Missing attribute value"; - w->etext[GENX_MALFORMED_COMMENT] = "Malformed comment body"; + w->etext[GENX_SUCCESS] = "success"; + w->etext[GENX_BAD_UTF8] = "invalid UTF-8"; + w->etext[GENX_NON_XML_CHARACTER] = "non-XML character"; + w->etext[GENX_BAD_NAME] = "invalid name"; + w->etext[GENX_ALLOC_FAILED] = "memory allocation failed"; + w->etext[GENX_BAD_NAMESPACE_NAME] = "invalid namespace name"; + w->etext[GENX_INTERNAL_ERROR] = "internal error"; + w->etext[GENX_DUPLICATE_PREFIX] = "duplicate prefix"; + w->etext[GENX_SEQUENCE_ERROR] = "call out of sequence"; + w->etext[GENX_NO_START_TAG] = "no start tag for end element call"; + w->etext[GENX_IO_ERROR] = "io error"; + w->etext[GENX_MISSING_VALUE] = "missing attribute value"; + w->etext[GENX_MALFORMED_COMMENT] = "malformed comment body"; w->etext[GENX_MALFORMED_PI] = "?> in PI"; - w->etext[GENX_XML_PI_TARGET] = "Target of PI matches [xX][mM][lL]"; - w->etext[GENX_DUPLICATE_ATTRIBUTE] = - "Same attribute specified more than once"; + w->etext[GENX_XML_PI_TARGET] = "target of PI matches [xX][mM][lL]"; + w->etext[GENX_DUPLICATE_ATTRIBUTE] = "duplicate attribute"; w->etext[GENX_ATTRIBUTE_IN_DEFAULT_NAMESPACE] = - "Attribute cannot be in default namespace"; + "attribute is default namespace"; w->etext[GENX_DUPLICATE_NAMESPACE] = - "Declared namespace twice with different prefixes on one element."; + "namespace declared twice with different prefixes"; w->etext[GENX_BAD_DEFAULT_DECLARATION] = - "Declared a default namespace on an element which is in no namespace"; + "default namespace declared on an element which is not in a namespace"; /* the xml: namespace is pre-wired */ xml = genxDeclareNamespace(w, (utf8) "http://www.w3.org/XML/1998/namespace", -- cgit v1.1