[Vala] delegates with exceptions
- From: "Christian Hergert" <christian hergert gmail com>
- To: vala-list gnome org
- Subject: [Vala] delegates with exceptions
- Date: Wed, 25 Jun 2008 02:44:02 -0700
Hi folks,
I noticed that there is support for delegates to throw when wrapping
libraries (the vapi's do it in a few places). However, I'd like to
have a delegate in my vala code that can throw an error. This doesn't
seem to happen even though it compiles.
For example:
public delegate void Callback (Result result, void* data) throws GLib.Error;
currently compiles to,
typedef void (*Callback) (Result result, void* data, void* user_data);
While I'd expect it to compile to
typedef void (*Callback) (Result result, void* data, void*
user_data, GError **error);
Therefore, calling the method in a try/catch results in "warning:
unreachable catch clause detected".
If this really is a bug, and not just me, I'd be glad to submit a bug
report and perhaps start patching.
Cheers!
-- Christian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]