Nikolay Sivov : msxml3: Trace backend error even when user error handler is not set.

Alexandre Julliard julliard at winehq.org
Fri Oct 29 10:58:19 CDT 2010


Module: wine
Branch: master
Commit: b1aaa86e145670b510c178c59ff1d06fcc496cee
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b1aaa86e145670b510c178c59ff1d06fcc496cee

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Oct 29 02:06:33 2010 +0400

msxml3: Trace backend error even when user error handler is not set.

---

 dlls/msxml3/saxreader.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index fd461d1..a1df5c7 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -1298,15 +1298,6 @@ static void libxmlFatalError(void *ctx, const char *msg, ...)
     DWORD len;
     va_list args;
 
-    if(!has_error_handler(This))
-    {
-        xmlStopParser(This->pParserCtxt);
-        This->ret = E_FAIL;
-        return;
-    }
-
-    FIXME("Error handling is not compatible.\n");
-
     va_start(args, msg);
     vsprintf(message, msg, args);
     va_end(args);
@@ -1319,6 +1310,16 @@ static void libxmlFatalError(void *ctx, const char *msg, ...)
         TRACE("fatal error for %p: %s\n", This, debugstr_w(error));
     }
 
+    if(!has_error_handler(This))
+    {
+        xmlStopParser(This->pParserCtxt);
+        This->ret = E_FAIL;
+        heap_free(error);
+        return;
+    }
+
+    FIXME("Error handling is not compatible.\n");
+
     if(This->vbInterface)
     {
         BSTR bstrError = SysAllocString(error);
@@ -1788,7 +1789,7 @@ static HRESULT internal_parseBuffer(saxreader *This, const char *buffer, int siz
     locator->pParserCtxt->userData = locator;
 
     This->isParsing = TRUE;
-    if(xmlParseDocument(locator->pParserCtxt)) hr = E_FAIL;
+    if(xmlParseDocument(locator->pParserCtxt) == -1) hr = E_FAIL;
     else hr = locator->ret;
     This->isParsing = FALSE;
 




More information about the wine-cvs mailing list