using GLib;
-errordomain Maman.BarError {
+errordomain BarError {
FOO,
BAR
}
-class Maman.Bar : Object {
+class Bar : Object {
public void foo () throws BarError {
stdout.printf (" 6");
stdout.printf (" 10");
}
- static void test_generic_catch () {
+ public static void test_generic_catch () {
try {
throw new BarError.FOO ("error message");
} catch (Error e) {
assert_not_reached ();
}
- static void test_try_without_error () {
+ public static void test_try_without_error () {
try {
} catch (Error e) {
assert_not_reached ();
}
}
+}
- public static int main () {
- stdout.printf ("Exception Test: 1");
-
- var bar = new Bar ();
- bar.run ();
+void main () {
+ stdout.printf ("Exception Test: 1");
- stdout.printf (" 11\n");
+ var bar = new Bar ();
+ bar.run ();
- test_generic_catch ();
+ stdout.printf (" 11\n");
- return 0;
- }
+ Bar.test_generic_catch ();
+ Bar.test_try_without_error ();
}
-
-void main () {
- Maman.Bar.main ();
-}
-