diff options
author | Juerg Billeter <j@bitron.ch> | 2008-05-25 09:09:39 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-05-25 09:09:39 +0000 |
commit | e00f1fd4e7d048590383f270ed029164f927c484 (patch) | |
tree | 8b52f6759528853b82360489b745ea41e9ee2ef3 /vapigen | |
parent | fc3f605445a1df608abd7cf82c80c64db2070556 (diff) | |
download | vala-e00f1fd4e7d048590383f270ed029164f927c484.tar.gz |
Track error types that expressions can throw, based on patch by Jared
2008-05-25 Juerg Billeter <j@bitron.ch>
* vala/valacodenode.vala:
* vala/valacreationmethod.vala:
* vala/valaexpression.vala:
* vala/valagenieparser.vala:
* vala/valainterfacewriter.vala:
* vala/valamethod.vala:
* vala/valanamespace.vala:
* vala/valaparser.vala:
* vala/valasemanticanalyzer.vala:
* vala/valasourcefile.vala:
* gobject/valaccodeclassbinding.vala:
* gobject/valaccodegenerator.vala:
* gobject/valaccodeinvocationexpressionbinding.vala:
* gobject/valaccodemethodbinding.vala:
* vapigen/valagidlparser.vala:
* vapigen/valavapigen.vala:
Track error types that expressions can throw,
based on patch by Jared Moore, fixes bug 482999
svn path=/trunk/; revision=1420
Diffstat (limited to 'vapigen')
-rw-r--r-- | vapigen/valagidlparser.vala | 2 | ||||
-rw-r--r-- | vapigen/valavapigen.vala | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 2e482f885..dac27e879 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -1334,7 +1334,7 @@ public class Vala.GIdlParser : CodeVisitor { } if (suppress_throws == false && param_is_exception (param)) { - m.add_error_domain (parse_type (param.type)); + m.add_error_type (parse_type (param.type)); continue; } diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala index 8d386699e..ae982d28f 100644 --- a/vapigen/valavapigen.vala +++ b/vapigen/valavapigen.vala @@ -80,11 +80,14 @@ class Vala.VAPIGen : Object { } private static string[]? get_packages_from_depsfile (string depsfile) { - string contents; - if (FileUtils.get_contents (depsfile, out contents)) { + try { + string contents; + FileUtils.get_contents (depsfile, out contents); return contents.strip ().split ("\n"); + } catch (FileError e) { + // deps files are optional + return null; } - return null; } private int run () { |