guile-user
[Top][All Lists]
Advanced

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

Re: Newbie seeks guiding hands.


From: Gary Benson
Subject: Re: Newbie seeks guiding hands.
Date: Thu, 15 Mar 2001 17:12:01 +0000 (GMT)

On Thu, 15 Mar 2001, Martin Grabmueller wrote:

> > From: Gary Benson <address@hidden>
> > Date: Thu, 15 Mar 2001 11:41:53 +0000 (GMT)
> > 
> > Can you control which stream they are printed on? Having them appear on
> > stderr would be bad news...
> 
> They are only printed out if you don't install an exception handler.
> You can catch the exception, extract information from the exception
> and print it yourself.
>
> > > > One further question I thought of: how does Guile handle
> > > > internationalisation? Specifically of messages displayed by the Scheme
> > > > part of rcalc. This may be a question that could be handled by poking
> > > > aroung in Gnucash (since rcalc is a GNOME program as well), but if
> > > > anyone has any `high-level' knowledge then that would be welcome.
> > > 
> > > Currently, Guile does not bother with i18n at all.  There were
> > > discussions and plans about supporting multibyte strings internally a
> > > while ago, but I think so far there was no consensus about how to
> > > handle things like that.  Error messages are not localized at all.
> > 
> > Hmmm. That is a shame. Is it possible to catch the messages before they
> > are printed? Some kind of exception handling would be my favourite way,
> > like the try{}catch{} blocks of C++ and Java.
> 
> That's exactly the way it works in Guile.  Errors are signalled by
> throwing exceptions, and these exceptions can be caught, either on the
> C or on the Scheme level.  Unfortunately, this is not documented well
> in the Reference Manual yet.

This is excellent news. About 3 months ago I rewrote the rcalc calculation
engine in C++ but it was massively overcomplicated compared to the C
one. I decided that the _only_ thing that I liked about the C++ version
was the exception handler.

Trapping the errors on the C side will probably be the best way from a
translations point of view I think. I must see what Gnucash does.

Can anyone suggest any other GNOME programs that use Guile?

Gary

[ address@hidden ][ PGP 85A8F78B ][ http://inauspicious.org/ ]





reply via email to

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