diff src/jscomp.sml @ 1847:8958b580d026

Change Name_js to skip code snippets that depend on the CSRF-protection signature
author Adam Chlipala <adam@chlipala.net>
date Mon, 01 Apr 2013 10:13:49 -0400
parents c1e3805e604e
children e15234fbb163
line wrap: on
line diff
--- a/src/jscomp.sml	Tue Mar 19 19:10:31 2013 -0400
+++ b/src/jscomp.sml	Mon Apr 01 10:13:49 2013 -0400
@@ -507,13 +507,14 @@
                                 0 => s
                               | _ => jsifyStringMulti (n - 1, jsifyString s)
 
-                        fun deStrcat level (all as (e, _)) =
+                        fun deStrcat level (all as (e, loc)) =
                             case e of
                                 EPrim (Prim.String s) => jsifyStringMulti (level, s)
                               | EStrcat (e1, e2) => deStrcat level e1 ^ deStrcat level e2
                               | EFfiApp ("Basis", "jsifyString", [(e, _)]) => "\"" ^ deStrcat (level + 1) e ^ "\""
-                              | _ => (Print.prefaces "deStrcat" [("e", MonoPrint.p_exp MonoEnv.empty all)];
-                                      raise Fail "Jscomp: deStrcat")
+                              | _ => (ErrorMsg.errorAt loc "Unexpected non-constant JavaScript code";
+                                      Print.prefaces "deStrcat" [("e", MonoPrint.p_exp MonoEnv.empty all)];
+                                      "")
 
                         val quoteExp = quoteExp loc
                     in