From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: proposal: meaningful read error messages Date: Mon, 29 Jul 2002 14:24:37 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <15685.13317.103079.561203@meddo.cs.uu.nl> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1027945485 1890 127.0.0.1 (29 Jul 2002 12:24:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2002 12:24:45 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Z9Zs-0000UG-00 for ; Mon, 29 Jul 2002 14:24:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Z9aD-0003Rr-00; Mon, 29 Jul 2002 08:25:05 -0400 Original-Received: from aurora.cs.uu.nl ([131.211.80.20] helo=mail.cs.uu.nl) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Z9Zl-0003RU-00 for ; Mon, 29 Jul 2002 08:24:38 -0400 Original-Received: from meddo.cs.uu.nl.cs.uu.nl (meddo.cs.uu.nl [131.211.80.91]) by mail.cs.uu.nl (Postfix) with ESMTP id 3A1C71CB2E7 for ; Mon, 29 Jul 2002 14:24:37 +0200 (CEST) Original-To: guile-devel@gnu.org X-Mailer: VM 7.03 under Emacs 21.2.1 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:877 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:877 Hello there: I propose to install more meaningful error messages in scm_lreadr(): we could replace SCM_MISC_ERROR() by the following macro: #define INPUT_ERROR(port,message,arg) \ { char s[1024];\ char *fn = scm_string_p (SCM_FILENAME(port)) ? SCM_STRING_CHARS(SCM_FILENAME(port)) : ""; \ sprintf (s, "In %s:%ld:%d : %s", fn, SCM_LINUM(port), SCM_COL(port) + 1, message);\ SCM_MISC_ERROR(s, arg);\ }\ any thoughts, comments? (Should this be switched off if SCM_RECORD_POSITIONS_P is off?) meddo:/tmp$ echo -e "\n\n )" > foo.scm meddo:/tmp$ ~/usr/bin/guile -s foo.scm Unexpected ")" in line 2, col 2 ERROR: In procedure scm_lreadr: ERROR: unexpected ")" meddo:/tmp$ /usr/bin/guile -s foo.scm ERROR: In procedure read: ERROR: unexpected ")" -- Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen/ _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel