From: Han-Wen Nienhuys <hanwen@cs.uu.nl>
Subject: proposal: meaningful read error messages
Date: Mon, 29 Jul 2002 14:24:37 +0200 [thread overview]
Message-ID: <15685.13317.103079.561203@meddo.cs.uu.nl> (raw)
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
next reply other threads:[~2002-07-29 12:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-29 12:24 Han-Wen Nienhuys [this message]
2002-08-19 6:50 ` proposal: meaningful read error messages Dirk Herrmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15685.13317.103079.561203@meddo.cs.uu.nl \
--to=hanwen@cs.uu.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).