[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/05: offload: Remove 'with-nar-error-handling' macro.
From: |
Ludovic Courtès |
Subject: |
04/05: offload: Remove 'with-nar-error-handling' macro. |
Date: |
Sat, 5 Nov 2016 15:32:13 +0000 (UTC) |
civodul pushed a commit to branch wip-guile-ssh
in repository guix.
commit 043d7456a88ee5c82e28298af2f6249bc9a8dabb
Author: Ludovic Courtès <address@hidden>
Date: Sat Nov 5 00:46:04 2016 +0100
offload: Remove 'with-nar-error-handling' macro.
* guix/scripts/offload.scm (with-nar-error-handling): Remove.
(guix-offload): Use 'with-error-handling' instead.
---
guix/scripts/offload.scm | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 5e05231..d9d7d6b 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -650,17 +650,6 @@ defines a total order on machines.)"
;; Not now, all the machines are busy.
(display "# postpone\n")))))))
-(define-syntax-rule (with-nar-error-handling body ...)
- "Execute BODY with any &nar-error suitably reported to the user."
- (guard (c ((nar-error? c)
- (let ((file (nar-error-file c)))
- (if (condition-has-type? c &message)
- (leave (_ "while importing file '~a': ~a~%")
- file (gettext (condition-message c)))
- (leave (_ "failed to import file '~a'~%")
- file)))))
- body ...))
-
;;;
;;; Entry point.
@@ -691,7 +680,7 @@ defines a total order on machines.)"
(cond ((regexp-exec request-line-rx line)
=>
(lambda (match)
- (with-nar-error-handling
+ (with-error-handling
(process-request (equal? (match:substring match 1) "1")
(match:substring match 2) ; system
(call-with-input-file