Bug 186763 - [ServiceProviders] Exceptions should not be hidden from user when they happen
Summary: [ServiceProviders] Exceptions should not be hidden from user when they happen
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal
Target Milestone: 2.1   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-14 06:15 EDT by Dmitry Stadnik CLA
Modified: 2010-07-19 12:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Stadnik CLA 2007-05-14 06:15:26 EDT
'Validate' action has disappeared from workbench menu without any reason; contribution has not changed and there were no exceptions in error log. After debugging for some time I've discovered that NPE happens in TaiPanDiagramActionBarContributor but:
1. It was not reported since org.eclipse.gmf.runtime.common.core.util.Trace.catching() reports exceptions only when 'debug' option is set in tracing options and tracing is enabled; that's wrong because exceptions should always be reported!
2. Further processing was stopped so contributions from other providers were not visible.

So: always report exceptions that happen in error log and make contribution service more reliable.
Comment 1 Anthony Hunter CLA 2007-05-16 14:54:37 EDT
Exceptions should be calling org.eclipse.gmf.runtime.common.core.util.Log which log to the log file.

Is this not the case in one of the GMF Services?

Is the issue still the TaiPan example? How can we duplicate the issue? 
Comment 2 Dmitry Stadnik CLA 2007-05-18 06:22:52 EDT
You may replicate that in logic sample - open FontStyleAction and add code that throws exception: for example set 'action' to null in createBoldFontStyleAction(...). As a result 'Diagram' menu completely disappears without any messages in error log. If you don't like FontStyleAction you may contribute arbitrary action that causes exception to replicate the issue.

The idea of this request is that org.eclipse.gmf.runtime.common.core.util.Trace.catching() should be removed completely since it's dangerous to hide errors.
Comment 3 Eclipse Webmaster CLA 2010-07-19 12:29:17 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug