From: Jürg Billeter Date: Sun, 13 Sep 2009 19:51:55 +0000 (+0200) Subject: Also drop dynamic error warning from constructors X-Git-Tag: 0.7.6~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc2fc38707aa18320dfed53d22155a50b7b7891b;p=thirdparty%2Fvala.git Also drop dynamic error warning from constructors --- diff --git a/vala/valaconstructor.vala b/vala/valaconstructor.vala index a09027a75..f61f39831 100644 --- a/vala/valaconstructor.vala +++ b/vala/valaconstructor.vala @@ -1,6 +1,6 @@ /* valaconstructor.vala * - * Copyright (C) 2006-2008 Jürg Billeter + * Copyright (C) 2006-2009 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -79,7 +79,9 @@ public class Vala.Constructor : Symbol { } foreach (DataType body_error_type in body.get_error_types ()) { - Report.warning (body_error_type.source_reference, "unhandled error `%s'".printf (body_error_type.to_string())); + 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 = analyzer.current_symbol.parent_symbol; diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index 79cfa8eb0..8469e1778 100644 --- a/vala/valacreationmethod.vala +++ b/vala/valacreationmethod.vala @@ -220,7 +220,7 @@ public class Vala.CreationMethod : Method { can_propagate_error = true; } } - if (!can_propagate_error) { + if (!can_propagate_error && !((ErrorType) body_error_type).dynamic_error) { Report.warning (body_error_type.source_reference, "unhandled error `%s'".printf (body_error_type.to_string())); } }