guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposal: meaningful read error messages


From: Dirk Herrmann
Subject: Re: proposal: meaningful read error messages
Date: Mon, 19 Aug 2002 08:50:30 +0200 (CEST)

On Mon, 29 Jul 2002, Han-Wen Nienhuys wrote:

> 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?)

I like better error messages.  However, I would suggest to use a function
instead of a macro.  Performance is not a problem when it comes to
handling errors.

Best regards,
Dirk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]