6 errordomain Maman.BarError {
11 class Maman.Bar : Object {
12 public void foo () throws BarError {
15 throw new BarError.FOO (" 8");
17 stdout.printf (" BAD");
20 public int bad () throws BarError {
25 stdout.printf (" BAD");
30 public void good () throws BarError {
34 public void error_cast_check (GLib.Error e) {}
48 stdout.printf (" BAD");
49 } catch (BarError e) {
52 stdout.printf ("%s", e.message);
57 stdout.printf (" 10");
60 static void test_generic_catch () {
62 throw new BarError.FOO ("error message");
67 assert_not_reached ();
70 static void test_try_without_error () {
73 assert_not_reached ();
77 static int main (string[] args) {
78 stdout.printf ("Exception Test: 1");
83 stdout.printf (" 11\n");
85 test_generic_catch ();