Module: wine Branch: master Commit: 775671c3d8588efe3f94a35d21ab9b2902f8625f URL: http://source.winehq.org/git/wine.git/?a=commit;h=775671c3d8588efe3f94a35d21...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Oct 10 17:07:54 2017 +0200
vbscript: Be more verbose on unexpected error in a script.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/vbscript/tests/run.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index 00a0dee..798992f 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -1626,8 +1626,20 @@ static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, S static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror) { HRESULT hr = onerror_hres; - CHECK_EXPECT(OnScriptError);
+ if(!expect_OnScriptError) { + EXCEPINFO info; + ULONG line; + HRESULT hres; + + hres = IActiveScriptError_GetSourcePosition(pscripterror, NULL, &line, NULL); + if(SUCCEEDED(hres)) + hres = IActiveScriptError_GetExceptionInfo(pscripterror, &info); + if(SUCCEEDED(hres)) + trace("Error in line %u: %s\n", line+1, wine_dbgstr_w(info.bstrDescription)); + } + + CHECK_EXPECT(OnScriptError); onerror_hres = E_NOTIMPL;
return hr;