Jacek Caban : jscript: Propagate compiler error location.
Alexandre Julliard
julliard at winehq.org
Mon Feb 3 15:06:07 CST 2020
Module: wine
Branch: master
Commit: ed22d71fd2781d91432993027c65274f6a2de320
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ed22d71fd2781d91432993027c65274f6a2de320
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Feb 3 14:47:46 2020 +0100
jscript: Propagate compiler error location.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 1bf5f225de..2be5f24fae 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;
More information about the wine-cvs
mailing list