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

jscript: Propagate compiler error location.

parent 27e4881c
...@@ -2519,8 +2519,11 @@ HRESULT compile_script(script_ctx_t *ctx, const WCHAR *code, UINT64 source_conte ...@@ -2519,8 +2519,11 @@ HRESULT compile_script(script_ctx_t *ctx, const WCHAR *code, UINT64 source_conte
heap_pool_free(&compiler.heap); heap_pool_free(&compiler.heap);
parser_release(compiler.parser); parser_release(compiler.parser);
if(FAILED(hres)) { 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); release_bytecode(compiler.code);
return hres; return DISP_E_EXCEPTION;
} }
*ret = compiler.code; *ret = compiler.code;
......
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