From: Jürg Billeter Date: Sun, 13 Sep 2009 19:52:42 +0000 (+0200) Subject: Warn about unhandled errors in property accessors X-Git-Tag: 0.7.6~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a019dcc941ec8439a576fd96289a7c95413a15ed;p=thirdparty%2Fvala.git Warn about unhandled errors in property accessors --- diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala index b37f08e17..2a2120127 100644 --- a/vala/valapropertyaccessor.vala +++ b/vala/valapropertyaccessor.vala @@ -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;