[Mono-dev] New error handling framework for mono
Rafael Teixeira
monoman at gmail.com
Fri Aug 14 18:39:45 EDT 2009
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090814/7db1795f/attachment.html
More information about the Mono-devel-list
mailing list