[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
proposal: meaningful read error messages
From: |
Han-Wen Nienhuys |
Subject: |
proposal: meaningful read error messages |
Date: |
Mon, 29 Jul 2002 14:24:37 +0200 |
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 | address@hidden | http://www.cs.uu.nl/~hanwen/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- proposal: meaningful read error messages,
Han-Wen Nienhuys <=