1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-07 09:45:55 +02:00

linux-initrd: Display a backtrace when the initial program fails.

* guix/build/linux-initrd.scm (boot-system): Add pre-unwind handler in
  'catch' form around 'primitive-load', and call 'format' and
  'display-backtrace' from there.
This commit is contained in:
Ludovic Courtès
2014-05-20 21:56:20 +02:00
parent 9bea3b42b4
commit eb7ccb1afa
+3 -1
View File
@@ -482,10 +482,12 @@ to it are lost."
(catch #t
(lambda ()
(primitive-load to-load))
(lambda args
(start-repl))
(lambda args
(format (current-error-port) "'~a' raised an exception: ~s~%"
to-load args)
(start-repl)))
(display-backtrace (make-stack #t) (current-error-port))))
(format (current-error-port)
"boot program '~a' terminated, rebooting~%"
to-load)