]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Test error type check
authorJürg Billeter <j@bitron.ch>
Sun, 24 Aug 2014 10:49:16 +0000 (12:49 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 24 Aug 2014 10:50:25 +0000 (12:50 +0200)
tests/errors/errors.vala

index d56f3f230846a454bf82c438007a007967a9943f..264e6376dea583019b44cdd4d86c61b138b2d163 100644 (file)
@@ -58,7 +58,9 @@ class Maman.Bar : Object {
                try {
                        throw new BarError.FOO ("error message");
                } catch (Error e) {
-                       return;
+                       if (e is BarError && e is BarError.FOO) {
+                               return;
+                       }
                }
 
                assert_not_reached ();