Commit be583662 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Reset error number on error mode change.

parent 05512948
......@@ -1276,6 +1276,7 @@ static HRESULT interp_errmode(exec_ctx_t *ctx)
TRACE("%d\n", err_mode);
ctx->resume_next = err_mode;
ctx->script->err_number = S_OK;
return S_OK;
}
......
......@@ -284,6 +284,20 @@ x = 0
call callTestOnError(false)
call ok(x = 1, "x = " & x)
sub testOnErrorClear()
on error resume next
call ok(Err.Number = 0, "Err.Number = " & Err.Number)
throwInt(E_TESTERROR)
call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number)
on error goto 0
call ok(Err.Number = 0, "Err.Number = " & Err.Number)
x = "ok"
end sub
call testOnErrorClear()
call ok(x = "ok", "testOnErrorClear failed")
sub testForEachError()
on error resume next
......
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