Jacek Caban : jscript: Return error source and description from GetExceptionInfo.
Alexandre Julliard
julliard at winehq.org
Mon Feb 3 15:06:07 CST 2020
Module: wine
Branch: master
Commit: ed3e5404dd0c9bc6ed7747e23a1b818b4d60e503
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ed3e5404dd0c9bc6ed7747e23a1b818b4d60e503
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Feb 3 14:47:59 2020 +0100
jscript: Return error source and description from GetExceptionInfo.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/jscript/jscript.c | 4 ++++
dlls/jscript/tests/run.c | 3 +--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c
index 0e8d3ec2e9..8f79ea4bd4 100644
--- a/dlls/jscript/jscript.c
+++ b/dlls/jscript/jscript.c
@@ -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;
}
diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c
index 8b3cc8a1d2..1d11e00f44 100644
--- a/dlls/jscript/tests/run.c
+++ b/dlls/jscript/tests/run.c
@@ -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
More information about the wine-cvs
mailing list