diff --git a/hscript/Interp.hx b/hscript/Interp.hx index 1df4dc7..5deca70 100644 --- a/hscript/Interp.hx +++ b/hscript/Interp.hx @@ -605,6 +605,8 @@ class Interp { } public inline function warn(e:#if hscriptPos ErrorDef #else Error #end) { + #if hscriptPos var e = new Error(e, curExpr.pmin, curExpr.pmax, curExpr.origin, curExpr.line); #end + if(warnHandler != null) warnHandler(e); else