This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: GError
- From: Kevin Ryde <user42 at zip dot com dot au>
- To: Andy Wingo <wingo at pobox dot com>
- Cc: guile-gtk at sources dot redhat dot com
- Date: Mon, 26 May 2003 09:16:16 +1000
- Subject: Re: GError
- References: <20030524113300.GB24132@lark>
Andy Wingo <wingo@pobox.com> writes:
>
> With regards to GError, I think the solution you propose is too much
> like C programming.
Oh, well, if it's nice and close then at least people familiar with
the C style will find the guile interface comfortingly similar. Or
vice versa even.
> Wouldn't it be nicer if, instead of forcing the
> programmer to know about GErrors, if we simply threw an exception if the
> GError is set?
Perhaps make the gerror parameter optional, if omitted an error is
thrown. Or a special value 'error or something to mean that.
That could allow a choice between programming in typical glib style
(check return values) or more typical guile style (file i/o throws
exceptions).