Nikolay Sivov : msxml3: Output error message for fatal errors.
Alexandre Julliard
julliard at winehq.org
Wed Oct 27 12:50:58 CDT 2010
Module: wine
Branch: master
Commit: 9a3bfce9c032715b86a1ccdac0bb4162bc0906da
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9a3bfce9c032715b86a1ccdac0bb4162bc0906da
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Oct 27 01:25:26 2010 +0400
msxml3: Output error message for fatal errors.
---
dlls/msxml3/saxreader.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index fbc10cf..a0c821e 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;
More information about the wine-cvs
mailing list