Bug 388802 - [DataBinding] Log Errors when catching Exception in UpdateValueStrategy doSet & Co.
Summary: [DataBinding] Log Errors when catching Exception in UpdateValueStrategy doSet...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.6 M7   Edit
Assignee: Conrad Groth CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
: 483172 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-04 19:17 EDT by Michael Vorburger CLA
Modified: 2016-06-09 10:11 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Vorburger CLA 2012-09-04 19:17:09 EDT
When things go wrong in DataBinding, they are hard to catch.

I do understand that the basic approach of binding makes the usual propagation of exceptions up the calling stack difficult (useless, who would catch it?), and that the ValidationStatus (IStatus) should be checked by e.g. a UI, but would argue that simply also providing more logging exceptions as error when caught inside Data Binding couldn't hurt and would help in development.

More specifically, I would suggest logging the Exception caught in org.eclipse.core.databinding.UpdateValueStrategy#doSet(), and related similar methods such as UpdateListStrategy's doAdd() & doMove() & doReplace() as well as UpdateSetStrategy's doAdd() & doRemove().

Logging "Framework" chosen probably wouldn't be slfj4j or similar API, but DataBinding's own Policy.getLog().log(new Status(IStatus.ERROR, Policy.JFACE_DATABINDING, 0, "..." / e.getMessage()?, e)); as elsewhere in the DataBinding codebase.

If you think this idea is of interest and prefer getting a concrete patch proposal / GitHub pull request instead of the textual proposal above, please let me know and I'll contribute one.
Comment 1 Christian Pontesegger CLA 2015-12-08 04:47:50 EST
*** Bug 483172 has been marked as a duplicate of this bug. ***
Comment 2 Lars Vogel CLA 2015-12-08 04:55:16 EST
Patches are welcome.
Comment 3 Lars Vogel CLA 2015-12-09 02:22:57 EST
Conrad told me that he is working on a patch.
Comment 4 Eclipse Genie CLA 2015-12-27 12:02:16 EST
New Gerrit change created: https://git.eclipse.org/r/63294
Comment 5 Conrad Groth CLA 2016-01-22 15:14:57 EST
Can someone please review the change?
Comment 6 Conrad Groth CLA 2016-03-06 13:04:26 EST
I would really appreciate if someone reviews this change.
Comment 8 Simon Scholz CLA 2016-04-12 06:16:03 EDT
Thanks for this patch, Conrad. I think a lot of users have been missing these exception logging, since they we somehow suppressed beforehand.