From 133c401f774d803f92933e9cadb6791641913beb Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 6 Dec 2018 11:11:04 +0900 Subject: installer: Display an eventual backtrace in a page. * gnu/installer.scm (installer-program): Write the backtrace in "/tmp/last-installer-error" and pass the filename to installer-exit-error. * gnu/installer/newt.scm (exit-error): Display the file passed above in a textbox. --- gnu/installer.scm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'gnu/installer.scm') diff --git a/gnu/installer.scm b/gnu/installer.scm index 586ed29a59..2f01d39d1a 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -333,16 +333,15 @@ selected keymap." #:steps steps)) (const #f) (lambda (key . args) - ((installer-exit-error current-installer) key args) - - ;; Be sure to call newt-finish, to restore the terminal into - ;; its original state before printing the error report. - (call-with-output-file "/tmp/error" - (lambda (port) - (display-backtrace (make-stack #t) port) - (print-exception port - (stack-ref (make-stack #t) 1) - key args))) + (let ((error-file "/tmp/last-installer-error")) + (call-with-output-file error-file + (lambda (port) + (display-backtrace (make-stack #t) port) + (print-exception port + (stack-ref (make-stack #t) 1) + key args))) + ((installer-exit-error current-installer) + error-file key args)) (primitive-exit 1))) ((installer-exit current-installer))))))) -- cgit v1.2.3