GNOME Bugzilla – Bug 561766
error is not propagated when chaining up functions with 'return'.
Last modified: 2008-11-29 18:53:08 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:
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 ***