Bug 243841 - MBS being unable to create instances of toolchain handlers fails silently
Summary: MBS being unable to create instances of toolchain handlers fails silently
Status: REOPENED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 5.0   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-12 03:21 EDT by Torkild Resheim CLA
Modified: 2020-09-04 15:26 EDT (History)
1 user (show)

See Also:


Attachments
Patch for logging exceptions when instantiation fails (16.59 KB, text/plain)
2008-08-12 03:27 EDT, Torkild Resheim CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torkild Resheim CLA 2008-08-12 03:21:23 EDT
Build ID: I20080617-2000

Steps To Reproduce:
When for instance org.eclipse.cdt.managedbuilder.internal.core.Tool is unable to create an instance of the "commandLineGenerator" specified in the Tool element of the toolchain declaration a CoreException is thrown which is ignored silently.

Instead an event should be logged for debugging purposes.
Comment 1 Torkild Resheim CLA 2008-08-12 03:27:02 EDT
Created attachment 109754 [details]
Patch for logging exceptions when instantiation fails

The PLUGIN_ID member variable of ManagedBuilderCorePlugin has been made public and all CoreExceptions thrown when attempting to create instances using instances from the toolchain declaration (in org.eclipse.cdt.managedbuilder.internal.core) are handled using: StatusManager.getManager().handle(e,ManagedBuilderCorePlugin.PLUGIN_ID);
Comment 2 Andrew Gvozdev CLA 2009-09-12 21:56:20 EDT
(In reply to comment #1)
> The PLUGIN_ID member variable of ManagedBuilderCorePlugin has been made public
> and all CoreExceptions thrown when attempting to create instances using
> instances from the toolchain declaration (in
> org.eclipse.cdt.managedbuilder.internal.core) are handled using:
> StatusManager.getManager().handle(e,ManagedBuilderCorePlugin.PLUGIN_ID);
I agree that exceptions should be recorded but why do you use StatusManager if everywhere else in the plugin errors are reported via ManagedBuilderCorePlugin.log()?
It's been a while and the patch does not apply clean anymore.
Comment 3 Andrew Gvozdev CLA 2009-10-09 14:38:28 EDT
Closing as there is no response from submitter. Please reopen if still want to proceed with this.
Comment 4 Torkild Resheim CLA 2009-10-19 10:18:12 EDT
Sorry about not answering. I missed your reply. 

I agree that ManagedBuilderCorePlugin.log() should be used instead. It's been a while since my original request to have this fixed so I cannot remember my original motivation to use the StatusManager. I think the problem was that using the CDT logger would just add an entry to the log and not pop up an UI also I think the error log view was still a part of PDE at that time. So that most users will never be aware of a problem unless they actually have PDE installed (unlikely) and checked the view.

I have not taken a look the newer code so I don't know if the problem is still there. Reopening for now. I'll see if I can find the time to submit a new patch soon.
Comment 5 Andrew Gvozdev CLA 2009-11-16 13:35:17 EST
Returning to the pool until new patch provided.