all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#29922] [PATCH] linux-boot: Improve error reporting.
@ 2018-01-01  0:42 Danny Milosavljevic
  2018-01-01  8:56 ` [bug#29922] [PATCH v2] " Danny Milosavljevic
  0 siblings, 1 reply; 12+ messages in thread
From: Danny Milosavljevic @ 2018-01-01  0:42 UTC (permalink / raw)
  To: 29922

* gnu/build/linux-boot.scm (boot-system): Improve error reporting.
---
 gnu/build/linux-boot.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 4dd740174..85c855e40 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -507,7 +507,23 @@ to it are lost."
              (switch-root "/root")
              (format #t "loading '~a'...\n" to-load)
 
-             (primitive-load to-load)
+             (catch #t
+               (lambda ()
+                 (primitive-load to-load))
+               (lambda (key . args)
+                 (format (current-error-port) "Error: ~a: ~a\n" key args)
+                 (reboot))
+               (lambda (key . args)
+                 (let ((print-frames
+                        (@@ (system repl debug) print-frames))
+                       (frame->stack-vector
+                        (@@ (system repl debug) frame->stack-vector))
+                       (stack-ref
+                        (@@ (system repl debug) stack-ref)))
+                   (print-frames
+                    (frame->stack-vector
+                     (stack-ref (make-stack #t) 0))
+                    #:width 1000000))))
 
              (format (current-error-port)
                      "boot program '~a' terminated, rebooting~%"

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-01-09 11:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-01  0:42 [bug#29922] [PATCH] linux-boot: Improve error reporting Danny Milosavljevic
2018-01-01  8:56 ` [bug#29922] [PATCH v2] " Danny Milosavljevic
2018-01-01 12:24   ` Danny Milosavljevic
2018-01-08  9:05   ` Ludovic Courtès
2018-01-08 11:18     ` Danny Milosavljevic
2018-01-08 14:05       ` Ludovic Courtès
2018-01-08 16:29         ` Danny Milosavljevic
2018-01-08 23:03           ` Ludovic Courtès
2018-01-09  8:45             ` [bug#29922] [PATCH 0/2] Make sure that marionette-operating-system fails on error Danny Milosavljevic
2018-01-09  8:46               ` [bug#29922] [PATCH 1/2] system: Export operating-system-user-kernel-arguments Danny Milosavljevic
2018-01-09  8:46                 ` [bug#29922] [PATCH 2/2] tests: marionette-operating-system: Add initrd parameter and kernel-arguments Danny Milosavljevic
2018-01-09 11:48               ` [bug#29922] [PATCH 0/2] Make sure that marionette-operating-system fails on error Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.