From abbb98714b455f36373c17f00c82db9d1c41d5db Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 17 Jan 2020 17:11:34 +0100 Subject: ui: Ignore 'raise-exception' frames when reporting exceptions. * guix/ui.scm (last-frame-with-source): Check whether FRAME corresponds to 'raise-exception' and skip it if it does. --- guix/ui.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'guix/ui.scm') diff --git a/guix/ui.scm b/guix/ui.scm index 01aeee49eb..4857a88827 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -175,7 +175,11 @@ (define (frame-with-source frame) (previous frame)) (if (not frame) previous - (if (frame-source frame) + + ;; On Guile 3, the latest frame with source may be that of + ;; 'raise-exception' in boot-9.scm. Skip it. + (if (and (frame-source frame) + (not (eq? 'raise-exception (frame-procedure-name frame)))) frame (loop (frame-previous frame) frame))))) -- cgit v1.2.3