From 9a3bfce9c032715b86a1ccdac0bb4162bc0906da Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 27 Oct 2010 01:25:26 +0400 Subject: [PATCH] msxml3: Output error message for fatal errors. --- dlls/msxml3/saxreader.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index fbc10cf9b7..a0c821e19f 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -1292,7 +1292,7 @@ static void libxmlFatalError(void *ctx, const char *msg, ...) { saxlocator *This = ctx; char message[1024]; - WCHAR *wszError; + WCHAR *error; DWORD len; va_list args; @@ -1311,22 +1311,25 @@ static void libxmlFatalError(void *ctx, const char *msg, ...) va_end(args); len = MultiByteToWideChar(CP_UNIXCP, 0, message, -1, NULL, 0); - wszError = heap_alloc(sizeof(WCHAR)*len); - if(wszError) - MultiByteToWideChar(CP_UNIXCP, 0, message, -1, wszError, len); + error = heap_alloc(sizeof(WCHAR)*len); + if(error) + { + MultiByteToWideChar(CP_UNIXCP, 0, message, -1, error, len); + TRACE("fatal error for %p: %s\n", This, debugstr_w(error)); + } if(This->vbInterface) { - BSTR bstrError = SysAllocString(wszError); + BSTR bstrError = SysAllocString(error); IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler, (IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrError, E_FAIL); SysFreeString(bstrError); } else ISAXErrorHandler_fatalError(This->saxreader->errorHandler, - (ISAXLocator*)&This->lpSAXLocatorVtbl, wszError, E_FAIL); + (ISAXLocator*)&This->lpSAXLocatorVtbl, error, E_FAIL); - heap_free(wszError); + heap_free(error); xmlStopParser(This->pParserCtxt); This->ret = E_FAIL; -- 2.32.0.93.g670b81a890