Jacek Caban : jscript: Be more verbose about parser failure.

Alexandre Julliard julliard at winehq.org
Fri Sep 7 13:26:22 CDT 2012


Module: wine
Branch: master
Commit: 42d75be69d9fef4f59153337e8af2f85d7b30d34
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=42d75be69d9fef4f59153337e8af2f85d7b30d34

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Sep  7 17:14:13 2012 +0200

jscript: Be more verbose about parser failure.

---

 dlls/jscript/parser.y |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index d108ab0..4c69ed9 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -21,6 +21,10 @@
 #include "jscript.h"
 #include "engine.h"
 
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(jscript);
+
 #define YYLEX_PARAM ctx
 #define YYPARSE_PARAM ctx
 
@@ -1516,6 +1520,8 @@ HRESULT script_parse(script_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
     jsheap_clear(mark);
     hres = parser_ctx->hres;
     if(FAILED(hres)) {
+        WARN("parser failed around %s\n",
+            debugstr_w(parser_ctx->begin+20 > parser_ctx->ptr ? parser_ctx->begin : parser_ctx->ptr-20));
         parser_release(parser_ctx);
         return hres;
     }




More information about the wine-cvs mailing list