summaryrefslogtreecommitdiff
path: root/libguile/throw.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-09-23 17:53:54 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-09-23 17:53:54 +0000
commitaa79839aac0b652cabb2d486609cb06bcd34f7a7 (patch)
treed749b22f3b857d16f3b3cc81a71bec62f229b456 /libguile/throw.c
parent2b55be7547e4afb5fc4a6b61f763c489bb3632e3 (diff)
downloadguile-aa79839aac0b652cabb2d486609cb06bcd34f7a7.tar.gz
(handler_message): The rest argument is the fourth
argument, not everything after the third. Call scm_display_backtrace_with_highlights, passing the rest argument when appropriate.
Diffstat (limited to 'libguile/throw.c')
-rw-r--r--libguile/throw.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/libguile/throw.c b/libguile/throw.c
index 6b8447fb6..2ff8140f8 100644
--- a/libguile/throw.c
+++ b/libguile/throw.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -387,18 +387,28 @@ handler_message (void *handler_data, SCM tag, SCM args)
char *prog_name = (char *) handler_data;
SCM p = scm_cur_errp;
- if (scm_ilength (args) >= 3)
+ if (scm_ilength (args) == 4)
{
SCM stack = scm_make_stack (SCM_BOOL_T, SCM_EOL);
SCM subr = SCM_CAR (args);
SCM message = SCM_CADR (args);
SCM parts = SCM_CADDR (args);
- SCM rest = SCM_CDDDR (args);
+ SCM rest = SCM_CADDDR (args);
if (SCM_BACKTRACE_P && scm_is_true (stack))
{
+ SCM highlights;
+
+ if (scm_is_eq (tag, scm_arg_type_key)
+ || scm_is_eq (tag, scm_out_of_range_key))
+ highlights = rest;
+ else
+ highlights = SCM_EOL;
+
scm_puts ("Backtrace:\n", p);
- scm_display_backtrace (stack, p, SCM_UNDEFINED, SCM_UNDEFINED);
+ scm_display_backtrace_with_highlights (stack, p,
+ SCM_BOOL_F, SCM_BOOL_F,
+ highlights);
scm_newline (p);
}
scm_i_display_error (stack, p, subr, message, parts, rest);