We can mix things a bit:

gboolean do_stuff () {
MonoError error = MONO_ERROR_INITIALIZER;
gboolean isOk= runtime_function_that_might_fail_returns_boolean(..., &error)
... // free resources
if (isOk)
    return TRUE;
mono_error_cleanup (&error);
return FALSE; //or raise an exception using mono_raise_exception
(mono_error_prepare_exception (&error));
}


Rafael "Monoman" Teixeira
---------------------------------------
"To be creative means to be in love with life. You can be creative only if
you love life enough that you want to enhance its beauty, you want to bring
a little more music to it, a little more poetry to it, a little more dance
to it."
Osho
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to