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: read errors Date: Mon, 5 Aug 2002 01:21:48 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <15693.46860.769864.876889@blauw.xs4all.nl> Reply-To: hanwen@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 1028503112 7433 127.0.0.1 (4 Aug 2002 23:18:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 4 Aug 2002 23:18:32 +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 17bUdp-0001ve-00 for ; Mon, 05 Aug 2002 01:18:29 +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 17bUeQ-0005XO-00; Sun, 04 Aug 2002 19:19:06 -0400 Original-Received: from smtpzilla1.xs4all.nl ([194.109.127.137]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17bUe0-0005Tp-00 for ; Sun, 04 Aug 2002 19:18:40 -0400 Original-Received: from blauw.xs4all.nl (blauw.xs4all.nl [213.84.26.127]) by smtpzilla1.xs4all.nl (8.12.0/8.12.0) with ESMTP id g74NIbft035490 for ; Mon, 5 Aug 2002 01:18:37 +0200 (CEST) Original-To: guile-devel@gnu.org X-Mailer: VM 7.05 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:973 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:973 I just added some friendly error messages to the reader. I haven't committed it yet, though. -- I have the following comment now. Perhaps someone can shed some light on the proper way to deal with errors? /* Give meaningful error messages for errors We use the format MESSAGE This happened in .... This is not standard GNU format, but the test-suite likes the real message to be in front. Hmmm. Maybe this is a kludge? Perhaps we should throw (list EXPR FILENAME LINENO COLUMNO), and have the exception handler sort out the error message? Where does the handler live, what are the conventions for the expression argument of the handler? How does this work for an error message like Backtrace: In standard input: 4: 0* [list ... standard input:4:1: While evaluating arguments to list in expression (list a b):standard input:4:1: Unbound variable: a ABORT: (unbound-variable) In any case, we would have to assemble that information anyway. */ #define INPUT_ERROR(port, message, arg) { \ char s[1024];\ int fn_found = SCM_STRINGP (SCM_FILENAME(port));\ char *fn = "";\ if (fn_found)\ fn = SCM_STRING_CHARS(SCM_FILENAME(port));\ snprintf (s, 1024, "%s\nThis happened in %s%s%s line %d column %d", message, \ fn_found ? "`" : "", \ fn,\ fn_found ? "'" : "", \ SCM_LINUM(port) + 1, SCM_COL(port) + 1); \ SCM_MISC_ERROR(s, arg); \ } -- 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