Update exception handling in load-new-guix-revision
This commit is contained in:
parent
931b7bc593
commit
3646de6097
1 changed files with 25 additions and 21 deletions
|
|
@ -1332,13 +1332,14 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
(lambda (exn)
|
||||
(put-message channel `(exception . ,exn)))
|
||||
(lambda ()
|
||||
(with-throw-handler #t
|
||||
(with-exception-handler
|
||||
(lambda (exn)
|
||||
(print-backtrace-and-exception/knots exn)
|
||||
(raise-exception exn))
|
||||
(lambda ()
|
||||
(call-with-values thunk
|
||||
(lambda values
|
||||
(put-message channel `(values ,@values)))))
|
||||
(lambda _
|
||||
(backtrace))))
|
||||
(put-message channel `(values ,@values)))))))
|
||||
#:unwind? #t))))
|
||||
|
||||
(match (get-message channel)
|
||||
|
|
@ -1528,18 +1529,20 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
(cons system #f))
|
||||
(raise-exception exn)))
|
||||
(lambda ()
|
||||
(with-throw-handler #t
|
||||
(with-exception-handler
|
||||
(lambda (exn)
|
||||
(simple-format
|
||||
(current-error-port)
|
||||
"failed to compute channel instance derivation for ~A\n"
|
||||
system)
|
||||
(print-backtrace-and-exception/knots exn)
|
||||
(raise-exception exn))
|
||||
(lambda ()
|
||||
(cons system
|
||||
(inferior-eval-with-store/non-blocking
|
||||
inferior
|
||||
inferior-store
|
||||
(inferior-code channel-instance system))))
|
||||
(lambda _
|
||||
(simple-format
|
||||
(current-error-port)
|
||||
"failed to compute channel instance derivation for ~A\n"
|
||||
system))))
|
||||
(inferior-code channel-instance system))))))
|
||||
#:unwind? #t)))))
|
||||
systems)))
|
||||
|
||||
|
|
@ -1697,11 +1700,11 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
|
||||
;; Normalise the locale for the inferior process
|
||||
(with-exception-handler
|
||||
(lambda (key . args)
|
||||
(lambda (exn)
|
||||
(simple-format
|
||||
(current-error-port)
|
||||
"warning: failed to set locale to en_US.UTF-8: ~A ~A\n"
|
||||
key args))
|
||||
"warning: failed to set locale to en_US.UTF-8: ~A\n"
|
||||
exn))
|
||||
(lambda ()
|
||||
(inferior-eval '(setlocale LC_ALL "en_US.UTF-8") inf)))
|
||||
|
||||
|
|
@ -2896,7 +2899,13 @@ SKIP LOCKED")
|
|||
(with-exception-handler
|
||||
(const #f)
|
||||
(lambda ()
|
||||
(with-throw-handler #t
|
||||
(with-exception-handler
|
||||
(lambda (exn)
|
||||
(simple-format (current-error-port)
|
||||
"error: load-new-guix-revision: ~A\n"
|
||||
exn)
|
||||
(print-backtrace-and-exception/knots exn)
|
||||
(raise-exception exn))
|
||||
(lambda ()
|
||||
(load-new-guix-revision
|
||||
conn
|
||||
|
|
@ -2907,12 +2916,7 @@ SKIP LOCKED")
|
|||
extra-inferior-environment-variables
|
||||
#:ignore-systems ignore-systems
|
||||
#:ignore-targets ignore-targets
|
||||
#:parallelism parallelism))
|
||||
(lambda (key . args)
|
||||
(simple-format (current-error-port)
|
||||
"error: load-new-guix-revision: ~A ~A\n"
|
||||
key args)
|
||||
(backtrace))))
|
||||
#:parallelism parallelism))))
|
||||
#:unwind? #t))
|
||||
#t)
|
||||
(begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue