From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: wrong type of agument... where ? Date: Sat, 06 Jan 2018 17:46:46 -0800 Message-ID: <87zi5qphix.fsf@gmail.com> References: <20171231132321.0186e7de@scratchpost.org> <20171231153503.3d0f9797@scratchpost.org> <20180101003918.501ab0c3@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eY038-0001MD-7r for guix-devel@gnu.org; Sat, 06 Jan 2018 20:46:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eY034-0000MN-7Z for guix-devel@gnu.org; Sat, 06 Jan 2018 20:46:58 -0500 Received: from mail-pg0-x231.google.com ([2607:f8b0:400e:c05::231]:42151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eY034-0000Le-1R for guix-devel@gnu.org; Sat, 06 Jan 2018 20:46:54 -0500 Received: by mail-pg0-x231.google.com with SMTP id q67so3487551pga.9 for ; Sat, 06 Jan 2018 17:46:53 -0800 (PST) In-Reply-To: <20180101003918.501ab0c3@scratchpost.org> (Danny Milosavljevic's message of "Mon, 1 Jan 2018 00:39:18 +0100") 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: Danny Milosavljevic Cc: guix-devel --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Danny Milosavljevic 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) >=20=20 > - (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)= ))) >=20=20 > (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? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlpRfAYACgkQ3UCaFdgi Rp0gYw//V1ELRWnwE4QbRWTSYyaC7CyNluG3n8l4O4fnI/51+6g6gyJYK6l1IhQP Sjra/tLMqHwi8ps8UtZig1Sf0JxAV9ZtHqpFwIMnD6KsLy5KphcBp7i7ACVNZfna Fw2ECX0karRGJ+qoFeGmMLoShApuGJb3OTCaqsbmMnv6s/m3D4BDTbEvPVYuOoQg O8/mHsPnSW59pPqOkDGaFc+vLV6rynJoeA7NtR/TRvRqH8Xfmh12fqXAd2jVF90j DTE4OuBQZaDOTUxC/r/mWL8uxXcTcYbbEzFmWK7yEdWOgqjxINeBDRso1kEQu3tq Vtqe2k7R6qYXVELOYuuJGJFPM4jY8xv3JVmgCpYzXLaIqG6O95nDRO8xHVp4tUSK wGe1iBFzdwYhdX3VroQgRMfc8DxuPBu5btzHi4oPXRTVLjGuQS3HbOTUSiLrMK9Z 1yUJ6m4E6hfuXHf7/XEgTXWS0tRxXrXGynVOLWqJG1RpqIW1AlRbRk2WSwtt2XGy geNv7v1yDD15N0MVOcIO5E5DM5A3504LPhrXhO1/AXfhCbqjg5LRsC9FOr4BO6ym /j7aWefSBzB0frY5uzpFNSuEviln9gMG6dX+ZbX/ugvdvIFFCgLFOc2FK964C6I7 dOwFhA9dUn70dWRRpBOw2Qi6x1hIpXVZTbB+8yKP7w9u3JeTq3c= =vjc7 -----END PGP SIGNATURE----- --=-=-=--