summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-10-10 18:31:10 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2013-10-10 18:31:10 -0400
commit7aa82ab7d08f012da50fded7dce93f2adffd2706 (patch)
tree08d5312366dba0153438c5c857ead3d0d93e696c /src/cjr_print.sml
parent7244c28025a9f64e444aabedfbae0b8a17fe25c1 (diff)
Remove uw_cutErrorLocation() hijinks
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index d2f77a36..bc8f1be6 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -1617,8 +1617,11 @@ and p_exp' par tail env (e, loc) =
string "tmp;",
newline,
string "uw_error(ctx, FATAL, \"",
- string (ErrorMsg.spanToString loc),
- string ": %s\", ",
+ string (if Settings.getDebug () then
+ ErrorMsg.spanToString loc ^ ": "
+ else
+ ""),
+ string "%s\", ",
p_exp' false false env e,
string ");",
newline,
@@ -3515,11 +3518,6 @@ fun p_file env (ds, ps) =
NONE => box []
| SOME n => box [string "static void uw_onError(uw_context ctx, char *msg) {",
newline,
- if Settings.getDebug () then
- box []
- else
- box [string "uw_cutErrorLocation(msg);",
- newline],
if !hasJs then
box [string "uw_set_script_header(ctx, \"",
string allScripts,