summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-01-17 17:11:34 +0100
committerLudovic Courtès <ludo@gnu.org>2020-01-17 17:11:34 +0100
commitabbb98714b455f36373c17f00c82db9d1c41d5db (patch)
treee01717e3611c81d02335f97b82901db37cc0d893
parentb2504b1205aa77bcc4c1d0b2c4b402c07982cd7a (diff)
downloadguix-abbb98714b455f36373c17f00c82db9d1c41d5db.tar.gz
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.
-rw-r--r--guix/ui.scm6
1 files changed, 5 insertions, 1 deletions
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 @@ information, or #f if it could not be found."
                (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)))))