diff options
Diffstat (limited to 'scripts/guix-data-service-process-branch-updated-email.in')
-rw-r--r-- | scripts/guix-data-service-process-branch-updated-email.in | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/scripts/guix-data-service-process-branch-updated-email.in b/scripts/guix-data-service-process-branch-updated-email.in index d8f6196..a0e97ae 100644 --- a/scripts/guix-data-service-process-branch-updated-email.in +++ b/scripts/guix-data-service-process-branch-updated-email.in @@ -27,6 +27,7 @@ (rnrs bytevectors) (squee) (email email) + (knots) (guix-data-service database) (guix-data-service branch-updated-emails)) @@ -35,20 +36,17 @@ (lambda (conn) (let* ((email-bytevector (get-bytevector-all (current-input-port)))) - (catch - #t + (with-exception-handler + (lambda _ #f) (lambda () - (with-throw-handler #t + (with-exception-handler + (lambda (exn) + (display "\nerror: while parsing email\n" + (current-error-port)) + (print-backtrace-and-exception/knots exn) + (raise-exception exn)) (lambda () (enqueue-job-for-email conn - (parse-email email-bytevector))) - (lambda (key . args) - (display "\nerror: while parsing email\n" - (current-error-port)) - (simple-format (current-error-port) - "~A: ~A\n\n" - key - args) - (display-backtrace (make-stack #t) (current-error-port))))) - (lambda (key . args) #f))))) + (parse-email email-bytevector))))) + #:unwind? #t)))) |