Jacek Caban (@jacek) commented about dlls/vbscript/compile.c:
ctx->ei.scode = error; ctx->ei.bstrSource = get_vbscript_string(VBS_COMPILE_ERROR); map_vbs_exception(&ctx->ei); + + /* For internal calls (Eval/Execute/ExecuteGlobal), don't report to OnScriptError. + * Just return SCRIPT_E_RECORDED to indicate ctx->ei is populated. */ + if(compiler->flags & SCRIPTTEXT_NOERRORREPORT) + return SCRIPT_E_RECORDED;
`SCRIPTTEXT_NOERRORREPORT` is a private flag mixed with public ones, which would be nice to avoid for clarity. In this particular case, I wonder if we could always record the location in `script_ctx_t` (with `error_loc_code` and `error_loc_offset`), always return `SCRIPT_E_RECORDED` and then have callers call `report_script_error` when appropriate. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10368#note_134363