Re: [RFC] Gnome2::GConf error handling



* Ross McFarland <rwmcfa1 neces com>:

* Situation in the Perl binding
...
using croak(); it is completely transparent from the Perl programmer's
...

you may already know and be doing this, but you want to use gperl_croak_error
rather than the perlapi croak. mainly for memory allocation reasons.

Yep, I'm already doing this.

* Possible improvements
...
So, I'd like to hear every comment you might have, and your alternative
solutions, if any, about this.


(in my opinion) the perlish way of doing this would be:

my $client = Gnome2::GConf::Client->get_default;
my $str;
eval { $str = $client->get_string("/test/app/key"); 1 };
if( $@ )
{
#    handle the error, ignore it, die etc.
}

This is the way things are working right now.

I could live without ever touching or extending error handling, but I
thought that using some of the facilities GConf already offers to the
programmer could be a good thing...

Regards,
 Emmanuele.

-- 
Emmanuele Bassi (Zefram)       [ http://digilander.libero.it/ebassi/blog ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4



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