jscript: Return error source and description from GetExceptionInfo.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-02-03 14:47:59 +01:00 committed by Alexandre Julliard
parent ed22d71fd2
commit ed3e5404dd
2 changed files with 5 additions and 2 deletions

View File

@ -168,6 +168,10 @@ static HRESULT WINAPI JScriptError_GetExceptionInfo(IActiveScriptError *iface, E
memset(excepinfo, 0, sizeof(*excepinfo));
excepinfo->scode = This->ei.error;
if(This->ei.source)
jsstr_to_bstr(This->ei.source, &excepinfo->bstrSource);
if(This->ei.message)
jsstr_to_bstr(This->ei.message, &excepinfo->bstrDescription);
return S_OK;
}

View File

@ -2345,13 +2345,12 @@ static void test_error_reports(void)
if (is_lang_english())
{
if(tests[i].error_source)
todo_wine
ok(ei.bstrSource && !lstrcmpW(ei.bstrSource, tests[i].error_source), "[%u] bstrSource = %s expected %s\n",
i, wine_dbgstr_w(ei.bstrSource), wine_dbgstr_w(tests[i].error_source));
else
ok(!ei.bstrSource, "[%u] bstrSource = %s expected NULL\n", i, wine_dbgstr_w(ei.bstrSource));
if(tests[i].description)
todo_wine
todo_wine_if(tests[i].todo_flags & ERROR_TODO_DESCRIPTION)
ok(ei.bstrDescription && !lstrcmpW(ei.bstrDescription, tests[i].description),
"[%u] bstrDescription = %s expected %s\n", i, wine_dbgstr_w(ei.bstrDescription), wine_dbgstr_w(tests[i].description));
else