diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-05-20 21:56:20 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-05-20 23:37:11 +0200 |
commit | eb7ccb1afaaa5db3a6c4fdec0a9f22919d100952 (patch) | |
tree | 6950f4750d95c2d2d78e90da9f2125144c56bc53 /guix | |
parent | 9bea3b42b49434bccd9acd296569d2a874eddb6e (diff) |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build/linux-initrd.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm index 9093e72695..8db9f02caf 100644 --- a/guix/build/linux-initrd.scm +++ b/guix/build/linux-initrd.scm @@ -483,9 +483,11 @@ to it are lost." (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) |