summaryrefslogtreecommitdiff
path: root/src
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
commitb877e9c099be92c78a439e9e9cb6553467f28237 (patch)
tree08d5312366dba0153438c5c857ead3d0d93e696c /src
parent71c58074582c14d4ff6ba38f60be80dad0e36be5 (diff)
Remove uw_cutErrorLocation() hijinks
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c10
-rw-r--r--src/cjr_print.sml12
2 files changed, 5 insertions, 17 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index e4aff33b..447733be 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -4103,16 +4103,6 @@ void uw_mayReturnIndirectly(uw_context ctx) {
ctx->allowed_to_return_indirectly = 1;
}
-void uw_cutErrorLocation(char *s) {
- char *s2;
-
- s2 = strstr(s, ": ");
- if (s2 == NULL || strcspn(s, "<&") < s2 - s)
- return;
-
- memmove(s, s2+2, strlen(s2+2)+1);
-}
-
uw_Basis_string uw_Basis_fresh(uw_context ctx) {
int len;
char *r;
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,