summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-10-23 06:26:29 +0100
committerjao <jao@gnu.org>2022-10-23 06:26:29 +0100
commit4f8b5d17ba2436ca08e6ba442ef8dd5a8fa5a714 (patch)
treea35811a34e57c16755121f36ba990f1e68649903 /src
parentd3e7dc792069724880356c4e0f8c1749b90ef1bb (diff)
downloadgeiser-chez-4f8b5d17ba2436ca08e6ba442ef8dd5a8fa5a714.tar.gz
geiser-chez-4f8b5d17ba2436ca08e6ba442ef8dd5a8fa5a714.tar.bz2
all relevant condition locations, not just the last one
Diffstat (limited to 'src')
-rw-r--r--src/geiser/geiser.ss9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/geiser/geiser.ss b/src/geiser/geiser.ss
index f040413..0644b4d 100644
--- a/src/geiser/geiser.ss
+++ b/src/geiser/geiser.ss
@@ -39,7 +39,7 @@
(define (code-location obj)
(let* ((i (inspect/object obj))
- (c (and i (i 'code))))
+ (c (and i (not (eq? 'simple (i 'type))) (i 'code))))
(if c
(let ((name `("name" . ,(or (c 'name) (write-to-string obj)))))
(call-with-values (lambda () (c 'source-path))
@@ -53,8 +53,11 @@
(define (condition-location c)
(let ((finder (make-object-finder procedure? c (collect-maximum-generation))))
- (let loop ((obj (finder)))
- (if obj (or (code-location (car obj)) (loop (finder))) '()))))
+ (let loop ((obj (finder)) (res '()))
+ (if obj
+ (let ((loc (code-location (car obj))))
+ (loop (finder) (if loc (cons loc res) res)))
+ res))))
(define (call-with-result thunk)
(let ((output-string (open-output-string)))