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>
This commit is contained in:
parent
0a15f2e02f
commit
775671c3d8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue