Re: [Vala] How to ignore exceptions?
- From: Xavier Bestel <xavier bestel free fr>
- To: Sam Wilson <tecywiz121 hotmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] How to ignore exceptions?
- Date: Mon, 31 Oct 2011 10:06:21 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]