From b877e9c099be92c78a439e9e9cb6553467f28237 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 10 Oct 2013 18:31:10 -0400 Subject: Remove uw_cutErrorLocation() hijinks --- src/cjr_print.sml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/cjr_print.sml') 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, -- cgit v1.2.3