From ed22d71fd2781d91432993027c65274f6a2de320 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 3 Feb 2020 14:47:46 +0100 Subject: [PATCH] jscript: Propagate compiler error location. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/jscript/compile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 1bf5f225ded..2be5f24fae8 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -2519,8 +2519,11 @@ HRESULT compile_script(script_ctx_t *ctx, const WCHAR *code, UINT64 source_conte heap_pool_free(&compiler.heap); parser_release(compiler.parser); if(FAILED(hres)) { + if(hres != DISP_E_EXCEPTION) + throw_error(ctx, hres, NULL); + set_error_location(ctx->ei, compiler.code, compiler.loc, IDS_COMPILATION_ERROR); release_bytecode(compiler.code); - return hres; + return DISP_E_EXCEPTION; } *ret = compiler.code;