summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-12-29 06:54:56 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-12-29 06:54:56 -0800
commit663729d0ff4961ea2ea904aa4de9f15c07ba632d (patch)
treefd256dd1c829b876f34d522a82d4cc98e763316e
parente89ead0276c347d4f5eac78f00d18d76ea4c39c3 (diff)
downloadtxr-663729d0ff4961ea2ea904aa4de9f15c07ba632d.tar.gz
txr-663729d0ff4961ea2ea904aa4de9f15c07ba632d.tar.bz2
txr-663729d0ff4961ea2ea904aa4de9f15c07ba632d.zip
Suppress "which is located at nil".
* eval.c (error_trace): If info is nil, print alternative message about the location being unavailable.
-rw-r--r--eval.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index 4110ddb6..07791880 100644
--- a/eval.c
+++ b/eval.c
@@ -256,11 +256,17 @@ void error_trace(val exsym, val exvals, val out_stream, val prefix)
prefix, info, last, nao);
}
- if (origin)
+ if (origin) {
format(out_stream, lit("~a ... an expansion at ~a of ~!~s\n"),
prefix, info, origin, nao);
- else if (!first)
- format(out_stream, lit("~a which is located at ~a\n"), prefix, info, nao);
+ } else if (!first) {
+ if (info)
+ format(out_stream, lit("~a which is located at ~a\n"), prefix,
+ info, nao);
+ else
+ format(out_stream, lit("~a whose location is unavailable\n"), prefix,
+ nao);
+ }
}
}