From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: unknown # error message Date: Tue, 03 Jun 2003 09:51:59 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87of1gf36o.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1054600818 13098 80.91.224.249 (3 Jun 2003 00:40:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2003 00:40:18 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jun 03 02:40:14 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19MzqX-0003Oy-00 for ; Tue, 03 Jun 2003 02:40:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19MzpW-0002x6-2x for guile-devel@m.gmane.org; Mon, 02 Jun 2003 20:39:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19MzHK-0002nv-RB for guile-devel@gnu.org; Mon, 02 Jun 2003 20:03:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19MzB7-0001vW-JS for guile-devel@gnu.org; Mon, 02 Jun 2003 19:57:27 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19MzAm-0001qf-7G for guile-devel@gnu.org; Mon, 02 Jun 2003 19:57:04 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) h52NqSPB025348 for ; Tue, 3 Jun 2003 09:54:40 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h52NqQQg011142 for ; Tue, 3 Jun 2003 09:52:26 +1000 (EST) Original-Received: from localhost (ppp92.dyn228.pacific.net.au [203.143.228.92]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h52NqOYZ029512 for ; Tue, 3 Jun 2003 09:52:25 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19Mz5r-0002PO-00; Tue, 03 Jun 2003 09:51:59 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2485 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2485 --=-=-= This is a followup to my report about the error message for an unknown "#" object in the reader. (Which I've since managed to lose.) For instance interactively with the latest cvs, (call-with-input-string "#Z" read) gives an exception during display of the error. * read.c (scm_input_error): Pass arg list parameter to scm_error_scm, rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr. * tests/reader.test (reading): Test bad # error message is formattable. I believe this is only in the head, not 1.6. I'm guessing that not passing the arg parameter to scm_error_scm was merely a typo. It looks like the intention, and that parameter is otherwise unused. --=-=-= Content-Disposition: attachment; filename=read.c.error-args.diff --- read.c.~1.90.~ 2003-05-10 10:11:50.000000000 +1000 +++ read.c 2003-06-02 17:08:54.000000000 +1000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1999,2000,2001,2003 Free Software + * Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -90,7 +91,7 @@ scm_error_scm (scm_str2symbol ("read-error"), scm_makfrom0str (function), string, - SCM_EOL, + arg, SCM_BOOL_F); } --=-=-= Content-Disposition: attachment; filename=reader.test.bad-hash.diff --- reader.test.~1.6.~ 2002-08-07 10:52:21.000000000 +1000 +++ reader.test 2003-06-02 17:08:25.000000000 +1000 @@ -18,7 +18,20 @@ (pass-if "1+i+i" (equal? (read-string "1+i+i") '1+i+i)) (pass-if "1+e10000i" - (equal? (read-string "1+e10000i") '1+e10000i))) + (equal? (read-string "1+e10000i") '1+e10000i)) + + ;; At one time the arg list for "Unknown # object: ~S" didn't make it out + ;; of read.c. Check that `format' can be applied to this error. + (pass-if "error message on bad #" + (catch #t + (lambda () + (read-string "#ZZZ") + ;; oops, this # is supposed to be unrecognised + #f) + (lambda (key subr message args rest) + (apply format #f message args) + ;; message and args are ok + #t)))) (pass-if-exception "radix passed to number->string can't be zero" exception:out-of-range --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--