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.
This commit is contained in:
Ludovic Courtès 2020-01-17 17:11:34 +01:00
parent b2504b1205
commit abbb98714b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -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)))))