* [cuirass] Typo?
@ 2023-10-31 21:20 Ricardo Wurmus
2023-11-16 15:16 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2023-10-31 21:20 UTC (permalink / raw)
To: guix-devel; +Cc: Mathieu Othacehe
Hi,
In (cuirass base) there is this definition:
--8<---------------cut here---------------start------------->8---
(define (exception-reporter . results)
"Return an exception handler that reports the exception on the error port
and returns the values RESULTS."
(lambda (key . args)
(false-if-exception
(let* ((stack (make-stack #t))
(depth (stack-length stack))
(frame (or (and (> depth 1) (stack-ref stack 1))
(and (> depth 0)) (stack-ref stack 0))))
(print-exception (current-error-port) frame key args)
(apply values results)))))
--8<---------------cut here---------------end--------------->8---
The parentheses for the binding of “frame” look wrong to me:
(frame (or (and (> depth 1) (stack-ref stack 1))
(and (> depth 0))
(stack-ref stack 0)))
--
Ricardo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [cuirass] Typo?
2023-10-31 21:20 [cuirass] Typo? Ricardo Wurmus
@ 2023-11-16 15:16 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2023-11-16 15:16 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel, Mathieu Othacehe
Ricardo Wurmus <rekado@elephly.net> skribis:
> In (cuirass base) there is this definition:
>
> (define (exception-reporter . results)
> "Return an exception handler that reports the exception on the error port
> and returns the values RESULTS."
> (lambda (key . args)
> (false-if-exception
> (let* ((stack (make-stack #t))
> (depth (stack-length stack))
> (frame (or (and (> depth 1) (stack-ref stack 1))
> (and (> depth 0)) (stack-ref stack 0))))
> (print-exception (current-error-port) frame key args)
> (apply values results)))))
>
> The parentheses for the binding of “frame” look wrong to me:
Indeed, fixed!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-16 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31 21:20 [cuirass] Typo? Ricardo Wurmus
2023-11-16 15:16 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).