From 53e1261f789f4a2a6b780c28e3c9dbcb79260028 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 25 Apr 2016 20:02:34 -0700 Subject: Pretty print filename in assertion. * match.c (v_assert, h_assert): Use ~a rather than ~s for c->curfile in assert message. --- match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/match.c b/match.c index e941c543..a1474926 100644 --- a/match.c +++ b/match.c @@ -3702,7 +3702,7 @@ static val v_assert(match_files_ctx *c) uw_throw(type, values); } else { if (c->curfile) - typed_error(assert_s, first_spec, lit("assertion (at ~s:~d)"), c->curfile, c->data_lineno, nao); + typed_error(assert_s, first_spec, lit("assertion (at ~a:~d)"), c->curfile, c->data_lineno, nao); typed_error(assert_s, first_spec, lit("assertion (line ~d)"), c->data_lineno, nao); } } @@ -3886,7 +3886,7 @@ static val h_assert(match_line_ctx *c) uw_throw(type, values); } else { if (c->file) - typed_error(assert_s, elem, lit("assertion (at ~s:~d)"), c->file, c->data_lineno, nao); + typed_error(assert_s, elem, lit("assertion (at ~a:~d)"), c->file, c->data_lineno, nao); typed_error(assert_s, elem, lit("assertion (line ~d)"), c->data_lineno, nao); } abort(); -- cgit v1.2.3