[PATCH] mshtml: implement ActiveScriptSite_OnScriptError.

Reece Dunn msclrhd at googlemail.com
Wed Sep 29 02:39:47 CDT 2010


Hi,

This reports any errors sent to the mshtml ActiveScriptSite
OnScriptError handler to the user and traces it to ERR to aid
debugging.

- Reece
-------------- next part --------------
From 118753565775987f5e8fc741d1a6a973d8ad8063 Mon Sep 17 00:00:00 2001
From: Reece Dunn <msclrhd at gmail.com>
Date: Wed, 29 Sep 2010 08:31:43 +0100
Subject: [PATCH] mshtml: implement ActiveScriptSite_OnScriptError.

---
 dlls/mshtml/script.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c
index 0b78e17..44cfc1b 100644
--- a/dlls/mshtml/script.c
+++ b/dlls/mshtml/script.c
@@ -355,8 +355,23 @@ static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, S
 static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
 {
     ScriptHost *This = ACTSCPSITE_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, pscripterror);
-    return E_NOTIMPL;
+    EXCEPINFO excep;
+    HRESULT hr;
+
+    TRACE("(%p)->(%p)\n", This, pscripterror);
+
+    hr = IActiveScriptError_GetExceptionInfo(pscripterror, &excep);
+
+    ERR("ActiveScript Error: %s source: %s\n",
+        debugstr_w(excep.bstrDescription), debugstr_w(excep.bstrSource));
+
+    MessageBoxW(NULL, excep.bstrDescription, excep.bstrSource, MB_OK|MB_ICONERROR);
+
+    SysFreeString(excep.bstrSource);
+    SysFreeString(excep.bstrDescription);
+    SysFreeString(excep.bstrHelpFile);
+
+    return S_OK;
 }
 
 static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface)
-- 
1.7.0.4


More information about the wine-patches mailing list