ui: 'with-error-handling' does not unwind the stack.
authorLudovic Courtès <ludo@gnu.org>
Tue, 14 Jul 2020 23:11:00 +0000 (01:11 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 14 Jul 2020 23:36:24 +0000 (01:36 +0200)
commita168c3e4f8d580f70e1c26bcdfc5b8378b2fa42d
tree0a56bad0d46ac769ee6a05ab333d01bcf69a885e
parent8003a5adaf6f11c8e24bdbe0d99a306f1ae2c507
ui: 'with-error-handling' does not unwind the stack.

Since a07d5e558b5403dad0a59776b950b6b02169c249, we've been getting
useless backtraces upon unhandled errors, like this:

  Backtrace:
     1 (primitive-load "/home/…/bin/guix")
  In guix/ui.scm:
    1953:12  0 (run-guix-command _ . _)

  guix/ui.scm:1953:12: In procedure run-guix-command:
  In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f

This change finally gives us real backtraces back.

* guix/ui.scm (guard*): New macro.
(call-with-error-handling): Use it instead of 'guard'.
guix/ui.scm