Commit 707f7eb2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Add err.source implementation.

parent 0d9f024d
......@@ -2500,8 +2500,8 @@ static HRESULT Err_Number(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARI
static HRESULT Err_Source(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return !This->desc ? E_UNEXPECTED : err_string_prop(&This->desc->ctx->ei.bstrSource, args, args_cnt, res);
}
static HRESULT Err_Clear(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res)
......
......@@ -2170,6 +2170,7 @@ HRESULT exec_script(script_ctx_t *ctx, function_t *func, vbdisp_t *vbthis, DISPP
clear_ei(&ctx->ei);
ctx->ei.scode = hres = map_hres(hres);
ctx->ei.bstrSource = get_vbscript_string(VBS_RUNTIME_ERROR);
ctx->ei.bstrDescription = get_vbscript_error_string(hres);
}else {
hres = ctx->ei.scode;
......
......@@ -134,6 +134,7 @@ sub testCStrError()
Error.clear()
CStr(null)
call ok(Err.number = 94, "Err.number = " & Err.number)
if isEnglishLang then call ok(Err.source = "Microsoft VBScript runtime error", "Err.source = " & Err.source)
if isEnglishLang then call ok(Err.description = "Invalid use of Null", "Err.description = " & Err.description)
end sub
call testCStrError()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment