~ubuntu-branches/ubuntu/lucid/vala/lucid

« back to all changes in this revision

Viewing changes to codegen/valagerrormodule.vala

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-04-02 10:10:55 UTC
  • mfrom: (1.4.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100402101055-qbx3okzv0tnp3wpp
Tags: 0.8.0-0ubuntu1
* New upstream release:
  - Infer type arguments when calling generic methods.
  - Support `in' operator for arrays.
  - Add experimental support for regular expression literals.
  - Add experimental support for chained relational expressions.
  - Add va_list support.
  - Add clutter-gtk-0.10 bindings (Gordon Allott).
  - Add gdl-1.0 bindings (Nicolas Joseph).
  - Add gstreamer-app-0.10 bindings (Sebastian Dröge).
  - Add gstreamer-cdda-0.10 bindings (Sebastian Dröge).
  - Add gudev-1.0 bindings (Jim Nelson).
  - Add libgda-report-4.0 bindings (Shawn Ferris).
  - Add libgvc (graphviz) bindings (Martin Olsson).
  - Add purple bindings (Adrien Bustany).
  - Many bug fixes and binding updates.
* debian/patches/99_ltmain_as-needed.patch: refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                var cassign = new CCodeAssignment (get_variable_cexpression ("_inner_error_"), (CCodeExpression) stmt.error_expression.ccodenode);
95
95
                cfrag.append (new CCodeExpressionStatement (cassign));
96
96
 
97
 
                head.add_simple_check (stmt, cfrag);
 
97
                head.add_simple_check (stmt, cfrag, true);
98
98
 
99
99
                stmt.ccodenode = cfrag;
100
100
 
188
188
                return false;
189
189
        }
190
190
 
191
 
        public override void add_simple_check (CodeNode node, CCodeFragment cfrag) {
 
191
        public override void add_simple_check (CodeNode node, CCodeFragment cfrag, bool always_fails = false) {
192
192
                current_method_inner_error = true;
193
193
 
194
194
                var inner_error = get_variable_cexpression ("_inner_error_");
309
309
                        cerror_handler = uncaught_error_statement (inner_error);
310
310
                }
311
311
 
312
 
                if (node is ThrowStatement) {
 
312
                if (always_fails) {
313
313
                        // inner_error is always set, avoid unnecessary if statement
314
314
                        // eliminates C warnings
315
315
                        cfrag.append (cerror_handler);
364
364
 
365
365
                // check for errors not handled by this try statement
366
366
                // may be handled by outer try statements or propagated
367
 
                add_simple_check (stmt, cfrag);
 
367
                add_simple_check (stmt, cfrag, !stmt.after_try_block_reachable);
368
368
 
369
369
                stmt.ccodenode = cfrag;
370
370
        }