Re: [Vala] How to ignore exceptions?
- From: pancake <pancake youterm com>
- To: Xavier Bestel <xavier bestel free fr>
- Cc: "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] How to ignore exceptions?
- Date: Mon, 31 Oct 2011 11:49:31 +0100
What about adding a code attribute like [IgnoreException] ? that would perform better than trycatching
On 31/10/2011, at 10:06, Xavier Bestel <xavier bestel free fr> 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
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]