After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 561766 - error is not propagated when chaining up functions with 'return'.
error is not propagated when chaining up functions with 'return'.
Status: RESOLVED DUPLICATE of bug 475922
Product: vala
Classification: Core
Component: Errors
0.5.x
Other All
: Normal major
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-21 06:04 UTC by rainwoodman
Modified: 2008-11-29 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description rainwoodman 2008-11-21 06:04:42 UTC
Please describe the problem:
When chaining up functions with return, the error thrown in the chainee is ignored. The caller of the chainer doesn't receive the error.

Steps to reproduce:
This portion of code
(
 appendChild: chainer,
 insertBefore: chainee,
)
---
public Node appendChild(Node newChild) throws Exception {
      return insertBefore(newChild, null);
}
----
is compiled into

----
DOMNode* dom_node_appendChild (DOMNode* self, DOMNode* newChild, GError** error) {
    GError * inner_error;
    g_return_val_if_fail (self != NULL, NULL);
    g_return_val_if_fail (newChild != NULL, NULL);
    inner_error = NULL;
    return dom_node_insertBefore (self, newChild, NULL, &inner_error);
}   
----





Actual results:
The inner_error is not properly propagated from the chainee to the caller.

Expected results:
The inner_error is properly propagated from the chainee to the caller.

Does this happen every time?


Other information:
Comment 1 Jürg Billeter 2008-11-29 18:53:08 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 475922 ***