From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: wrong type of agument... where ? Date: Mon, 1 Jan 2018 00:39:18 +0100 Message-ID: <20180101003918.501ab0c3@scratchpost.org> References: <20171231132321.0186e7de@scratchpost.org> <20171231153503.3d0f9797@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVnCR-0008JU-Vh for guix-devel@gnu.org; Sun, 31 Dec 2017 18:39:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVnCO-0004Yd-IY for guix-devel@gnu.org; Sun, 31 Dec 2017 18:39:28 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42332) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eVnCO-0004X6-Bg for guix-devel@gnu.org; Sun, 31 Dec 2017 18:39:24 -0500 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Catonano Cc: guix-devel 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~%"