Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 237727 - PartInitException could be more specific in ViewFactory.createView
Summary: PartInitException could be more specific in ViewFactory.createView
Status: RESOLVED DUPLICATE of bug 218197
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.5   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-18 23:10 EDT by Kevin McGuire CLA
Modified: 2009-03-05 14:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McGuire CLA 2008-06-18 23:10:40 EDT
ViewFactory.createView throws PartInitException.  The resulting message is:
   "Could not create view: <viewId>"

The failure is actually because the id is not in the view registry:

     IViewDescriptor desc = viewReg.find(id);
        // ensure that the view id is valid
        if (desc == null) {
			throw new PartInitException(NLS.bind(WorkbenchMessages.ViewFactory_couldNotCreate,  id ));
		}

It would be helpful if the message was more specific as PartInitException can be thrown for a number of reasons.
Comment 1 Kevin McGuire CLA 2008-06-18 23:38:03 EDT
It could instead say:
"Could not find view ID: <viewId>"
Comment 2 Eric Moffatt CLA 2008-06-19 10:39:20 EDT
I'll take this one...it's a subset of the 'failures' should be more graceful defect which I hope to take a cut at in 3.5.
Comment 3 Eric Moffatt CLA 2009-03-05 14:16:47 EST
Marking as a DUP of the defect we're using to track dynamic plugin issues...


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