]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Warn about unhandled errors in property accessors
authorJürg Billeter <j@bitron.ch>
Sun, 13 Sep 2009 19:52:42 +0000 (21:52 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 13 Sep 2009 19:52:42 +0000 (21:52 +0200)
vala/valapropertyaccessor.vala

index b37f08e173b6e3d5dbddfa7363a65925e8eb7766..2a21201277e03cd6176eac628ffe37f5dc40352c 100644 (file)
@@ -201,6 +201,12 @@ public class Vala.PropertyAccessor : Symbol {
                        }
 
                        body.check (analyzer);
+
+                       foreach (DataType body_error_type in body.get_error_types ()) {
+                               if (!((ErrorType) body_error_type).dynamic_error) {
+                                       Report.warning (body_error_type.source_reference, "unhandled error `%s'".printf (body_error_type.to_string()));
+                               }
+                       }
                }
 
                analyzer.current_symbol = old_symbol;