[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: substitute: Do not unwind stack traces upon uncaught exceptions.
From: |
guix-commits |
Subject: |
02/06: substitute: Do not unwind stack traces upon uncaught exceptions. |
Date: |
Wed, 24 Feb 2021 18:13:56 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit e2572aa95007558b008f04decff095f46d20e087
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Feb 23 17:01:24 2021 +0100
substitute: Do not unwind stack traces upon uncaught exceptions.
This is similar to commit a168c3e4f8d580f70e1c26bcdfc5b8378b2fa42d.
* guix/scripts/substitute.scm (with-networking): Use
'with-throw-handler' instead of 'catch'.
---
guix/scripts/substitute.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index a3a0349..832c82e 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès
<ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic
Courtès <ludo@gnu.org>
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
@@ -510,7 +510,9 @@ was found."
;; lookup errors are typically the first one, and because other errors are
;; a subset of `system-error', which is harder to filter.
((_ exp ...)
- (catch #t
+ ;; Use a pre-unwind handler so that re-throwing preserves useful
+ ;; backtraces. 'with-throw-handler' works for Guile 2.2 and 3.0.
+ (with-throw-handler #t
(lambda () exp ...)
(match-lambda*
(('getaddrinfo-error error)
- branch master updated (570c9c9 -> fc03a1a), guix-commits, 2021/02/24
- 06/06: gnu: Add chili-sddm-theme., guix-commits, 2021/02/24
- 04/06: guix: scripts: Fix corner cases of hint for option typo., guix-commits, 2021/02/24
- 05/06: gnu: solaar: Add missing dependencies for the GUI., guix-commits, 2021/02/24
- 03/06: substitute: Ensure backtraces go to file descriptor 4., guix-commits, 2021/02/24
- 02/06: substitute: Do not unwind stack traces upon uncaught exceptions.,
guix-commits <=
- 01/06: ui: Bug-report URL in '--help' can be translated., guix-commits, 2021/02/24