What about adding a code attribute like [IgnoreException] ? that would perform 
better than trycatching

On 31/10/2011, at 10:06, Xavier Bestel <[email protected]> wrote:

> On Sun, 2011-10-30 at 11:04 -0400, Sam Wilson wrote:
>> Perhaps a better way to do this is like this:
>> 
>> string[] test = new string[3];
>> for (int i = 0; i < 3; i++)
>> {
>>     try
>>     {
>>         test[i] = kf.get_string(group, key);
>>     }
>>     catch (KeyFile.Error error)
>>     {
>>         // Do nothing
>>     }
>> }
>> if (!test[0] && !test[1] && !test[3]) return false;
>> 
>> What do you think?
> 
> Won't that interrupt the execution flow, i.e. if the first
> g_key_file_get_string() throws an exception, the other ones won't be
> executed ?
> 
>    Xav
> 
> _______________________________________________
> vala-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/vala-list
> 
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to