[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
42/197: installer: Wrap installer in (catch #t ...)
From: |
Danny Milosavljevic |
Subject: |
42/197: installer: Wrap installer in (catch #t ...) |
Date: |
Mon, 3 Jul 2017 20:36:57 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit b61a33a210686ff8ff194f3c51a45c9da173e1a0
Author: John Darrington <address@hidden>
Date: Wed Dec 28 09:30:32 2016 +0100
installer: Wrap installer in (catch #t ...)
* gnu/system/installer/new.scm (guixsd-installer): Close the curses
display before showing backtrace on exceptions.
---
gnu/system/installer/new.scm | 73 +++++++++++++++++++++++++-------------------
1 file changed, 42 insertions(+), 31 deletions(-)
diff --git a/gnu/system/installer/new.scm b/gnu/system/installer/new.scm
index a1e6275..ca280f4 100644
--- a/gnu/system/installer/new.scm
+++ b/gnu/system/installer/new.scm
@@ -230,34 +230,45 @@
(define-public (guixsd-installer)
-
- (define stdscr (initscr)) ; Start curses
-
- ;; We don't want any nasty kernel messages damaging our beautifully
- ;; crafted display.
- (system* "dmesg" "--console-off")
-
- (cbreak!) ; Line buffering disabled
- (keypad! stdscr #t) ; Check for function keys
- (noecho!)
-
- (start-color!)
-
- (init-pair! livery-title COLOR_RED COLOR_BLACK)
-
- (curs-set 0)
-
- (let ((page (make-page
- stdscr (gettext "GuixSD Installer")
- main-page-refresh main-page-key-handler)))
-
- (set! page-stack (cons page page-stack))
- ((page-refresh page) (car page-stack))
- (let loop ((ch (getch stdscr)))
- (let ((current-page (car page-stack)))
- ((page-key-handler current-page) current-page ch)
- (base-page-key-handler current-page ch))
- ((page-refresh (car page-stack)) (car page-stack))
- (loop (getch stdscr)))
-
- (endwin)))
+ (catch #t
+ (lambda ()
+
+ (define stdscr (initscr)) ; Start curses
+
+ ;; We don't want any nasty kernel messages damaging our beautifully
+ ;; crafted display.
+ (system* "dmesg" "--console-off")
+
+ (cbreak!) ; Line buffering disabled
+ (keypad! stdscr #t) ; Check for function keys
+ (noecho!)
+
+ (start-color!)
+
+ (init-pair! livery-title COLOR_RED COLOR_BLACK)
+
+ (curs-set 0)
+
+ (let ((page (make-page
+ stdscr (gettext "GuixSD Installer")
+ main-page-refresh main-page-key-handler)))
+
+ (set! page-stack (cons page page-stack))
+ ((page-refresh page) (car page-stack))
+ (let loop ((ch (getch stdscr)))
+ (let ((current-page (car page-stack)))
+ ((page-key-handler current-page) current-page ch)
+ (base-page-key-handler current-page ch))
+ ((page-refresh (car page-stack)) (car page-stack))
+ (loop (getch stdscr)))
+
+ (endwin)))
+ (lambda (key . args)
+ (system* "dmesg" "--console-on")
+ (exit 2))
+ (lambda (key subr message args rest)
+ (let ((s (make-stack #t 3 primitive-load)))
+ (endwin)
+ (display-backtrace s (current-error-port))
+ (display-error (stack-ref s 0)
+ (current-error-port) subr message args rest)))))
- 27/197: installer: Deal with partition tables which are (partially) corrupt., (continued)
- 27/197: installer: Deal with partition tables which are (partially) corrupt., Danny Milosavljevic, 2017/07/03
- 28/197: installer: Add a variable to represent the minimum recommended store size., Danny Milosavljevic, 2017/07/03
- 32/197: installer: Remove ad-hoc completed predicate and use standard one., Danny Milosavljevic, 2017/07/03
- 34/197: installer: Replace some instances of "car"., Danny Milosavljevic, 2017/07/03
- 40/197: installer: Turn off kernel ring messages to console., Danny Milosavljevic, 2017/07/03
- 37/197: install: Define new procedure pipe-cmd and use it to implement window-pipe., Danny Milosavljevic, 2017/07/03
- 41/197: installer: Enable scrolling in the installation window., Danny Milosavljevic, 2017/07/03
- 38/197: installer: Correct bugs generating the configuration., Danny Milosavljevic, 2017/07/03
- 45/197: installer: Fix bug where window-pipe did not return the proper exit status., Danny Milosavljevic, 2017/07/03
- 43/197: installer: Rename module "new" to "guixsd-installer"., Danny Milosavljevic, 2017/07/03
- 42/197: installer: Wrap installer in (catch #t ...),
Danny Milosavljevic <=
- 48/197: installer: Close unused ports in pipe-cmd., Danny Milosavljevic, 2017/07/03
- 47/197: installer: Improve install page., Danny Milosavljevic, 2017/07/03
- 29/197: installer: Add a task to actually call guix system init., Danny Milosavljevic, 2017/07/03
- 53/197: installer: Change N_ from a procedure to a macro., Danny Milosavljevic, 2017/07/03
- 50/197: installer: Issue message to user on failure of filesystems task., Danny Milosavljevic, 2017/07/03
- 61/197: installer: Indicate which wireless access points are encrypted., Danny Milosavljevic, 2017/07/03
- 59/197: installer: Format configuration to fix width of window., Danny Milosavljevic, 2017/07/03
- 65/197: installer: Ensure that all mount points are absolute paths., Danny Milosavljevic, 2017/07/03
- 09/197: installer: Use a record instead of a list to contain tasks., Danny Milosavljevic, 2017/07/03
- 23/197: installer: Use a cleaner way of generating the lspci information., Danny Milosavljevic, 2017/07/03