2008-02-29 Juerg Billeter <j@bitron.ch>
* gobject/valaccodegenerator.vala: fix try catch statements without
thrown exceptions, fixes bug 506016
* tests/exceptions.vala: test try catch statements without errors
svn path=/trunk/; revision=1065
2008-02-29 Jürg Billeter <j@bitron.ch>
+ * gobject/valaccodegenerator.vala: fix try catch statements without
+ thrown exceptions, fixes bug 506016
+
+ * tests/exceptions.vala: test try catch statements without errors
+
+2008-02-29 Jürg Billeter <j@bitron.ch>
+
* gobject/valaccodegenerator.vala: support throw statements in try
statements
}
private void add_simple_check (CodeNode! node, CCodeFragment! cfrag) {
+ current_method_inner_error = true;
+
var cprint_frag = new CCodeFragment ();
var ccritical = new CCodeFunctionCall (new CCodeIdentifier ("g_critical"));
ccritical.add_argument (new CCodeConstant ("\"file %s: line %d: uncaught error: %s\""));
}
public override void visit_catch_clause (CatchClause! clause) {
+ current_method_inner_error = true;
+
clause.accept_children (this);
var cfrag = new CCodeFragment ();
assert_not_reached ();
}
+ static void test_try_without_error () {
+ try {
+ } catch (Error e) {
+ assert_not_reached ();
+ }
+ }
+
static int main (string[] args) {
stdout.printf ("Exception Test: 1");