summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-07 21:03:39 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-07 21:03:39 -0700
commit9424b0d60ea33427dc0063fd56a50b64033eff1a (patch)
tree16e89501aaf2af67e9817eab8e4279ce3fbcb49c
parent6d56f397e2c4a0cdbc9aff0a38fa29c3196986c4 (diff)
downloadtxr-9424b0d60ea33427dc0063fd56a50b64033eff1a.tar.gz
txr-9424b0d60ea33427dc0063fd56a50b64033eff1a.tar.bz2
txr-9424b0d60ea33427dc0063fd56a50b64033eff1a.zip
nuke trailing newlines from exception messages.
* signal.c (set_signal_handler, get_sign_handler): Eliminate newline in exception messages. * stream.c (unimpl, formatv): Likewise. * unwind.c (uw_block_abscond): Likewise.
-rw-r--r--signal.c4
-rw-r--r--stream.c10
-rw-r--r--unwind.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/signal.c b/signal.c
index 0f8f666f..ef64c64e 100644
--- a/signal.c
+++ b/signal.c
@@ -263,7 +263,7 @@ val set_sig_handler(val signo, val lambda)
sig_mask(SIG_BLOCK, &block, &saved);
if (sig < 0 || sig >= MAX_SIG)
- uw_throwf(error_s, lit("set-sig-handler: signal ~s out of range\n"), sig, nao);
+ uw_throwf(error_s, lit("set-sig-handler: signal ~s out of range"), sig, nao);
old_lambda = sig_lambda[sig];
@@ -311,7 +311,7 @@ val get_sig_handler(val signo)
cnum sig = c_num(signo);
if (sig < 0 || sig >= MAX_SIG)
- uw_throwf(error_s, lit("get-sig-handler: signal ~s out of range\n"), sig, nao);
+ uw_throwf(error_s, lit("get-sig-handler: signal ~s out of range"), sig, nao);
return sig_lambda[sig];
}
diff --git a/stream.c b/stream.c
index d85cd13b..51f0cb33 100644
--- a/stream.c
+++ b/stream.c
@@ -126,7 +126,7 @@ void stream_mark_op(val stream)
static noreturn void unimpl(val stream, val op)
{
- uw_throwf(file_error_s, lit("~a: not supported by stream ~s\n"),
+ uw_throwf(file_error_s, lit("~a: not supported by stream ~s"),
op, stream, nao);
abort();
}
@@ -3066,7 +3066,7 @@ val formatv(val stream_in, val fmtstr, struct args *al)
break;
default:
uw_throwf(error_s, lit("format: ~~~a conversion requires "
- "numeric arg: ~s given\n"),
+ "numeric arg: ~s given"),
chr(ch), obj, nao);
}
@@ -3078,7 +3078,7 @@ val formatv(val stream_in, val fmtstr, struct args *al)
/* guard against num_buf overflow */
if (precision > 128)
- uw_throwf(error_s, lit("excessive precision in format: ~s\n"),
+ uw_throwf(error_s, lit("excessive precision in format: ~s"),
num(precision), nao);
if (ch == 'e') {
@@ -3168,7 +3168,7 @@ val formatv(val stream_in, val fmtstr, struct args *al)
}
if (precision > 500)
- uw_throwf(error_s, lit("excessive precision in format: ~s\n"),
+ uw_throwf(error_s, lit("excessive precision in format: ~s"),
num(precision), nao);
sprintf(num_buf, "%.*g", precision, obj->fl.n);
@@ -3236,7 +3236,7 @@ val formatv(val stream_in, val fmtstr, struct args *al)
case 0:
uw_throwf(error_s, lit("missing format directive character"), nao);
default:
- uw_throwf(error_s, lit("unknown format directive character ~s\n"),
+ uw_throwf(error_s, lit("unknown format directive character ~s"),
chr(ch), nao);
output_num:
{
diff --git a/unwind.c b/unwind.c
index e4d4ae81..104bb11e 100644
--- a/unwind.c
+++ b/unwind.c
@@ -440,7 +440,7 @@ val uw_block_abscond(val tag, val result)
if (ex->uw.type == UW_BLOCK && ex->bl.tag == tag)
break;
if (ex->uw.type == UW_GUARD)
- uw_throwf(error_s, lit("~a: cannot abscond via foreign stack frames\n"),
+ uw_throwf(error_s, lit("~a: cannot abscond via foreign stack frames"),
prog_string, nao);
}