Cannot call methods that throw errors from finally
Compiling the following code:
public void test() throws GLib.Error {
try {
work();
} finally {
cleanup();
}
}
private void work() throws GLib.Error {
// all good
}
private void cleanup() throws GLib.Error {
// all good
}
Gives the following:
mjog@blanchefort:~/Projects/GNOME/geary$ valac --pkg glib-2.0 --pkg gio-2.0 743-jump-out-of-finally.vala
743-jump-out-of-finally.vala:3.5-7.5: error: jump out of finally block not permitted
Compilation failed: 1 error(s), 0 warning(s)