guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong type of agument... where ?


From: Chris Marusich
Subject: Re: wrong type of agument... where ?
Date: Sat, 06 Jan 2018 17:46:46 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Danny Milosavljevic <address@hidden> writes:

> Try this:
>
> diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
> index 4dd740174..810a0d63f 100644
> --- a/gnu/build/linux-boot.scm
> +++ b/gnu/build/linux-boot.scm
> @@ -507,7 +507,14 @@ 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)
> +                 (display-backtrace (make-stack #t) (current-error-port))))
>  
>               (format (current-error-port)
>                       "boot program '~a' terminated, rebooting~%"
>

In some other languages (e.g., Java, Python), we get stack traces by
default when an unhandled exception is thrown.  Is this not the case in
Guile?

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]