| Summary: | Creating same project name twice doesn't surface error | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> |
| Component: | Client | Assignee: | Susan McCourt <susan> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ken_walker, susan |
| Version: | unspecified | ||
| Target Milestone: | 1.0 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
John Arthorne
Susan I am investigating this, but I am confused about how it is supposed to work. Throughout fileCommands.js, it uses an errorHandler object like this:
function errorHandler(serviceRegistry, error) {
var progress = serviceRegistry.getService("orion.page.progress"); //$NON-NLS-0$
progress.setProgressResult(error);
}
However when this is hooked up to the various deferred calls, it is only called with a single argument which is the error. This results in a Type Error in the above because there is no getService function on the error object.
It looks like you changed this here:
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/diff/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js?id=e707eeae37a45bfe8fa8a8a0329c37c38b2e7a05
Before that commit, the error handler looked like this:
var errorHandler = function(error) {
progress.setProgressResult(error);
};
I.e., the error object is the first argument, which is what I would expect since this is what is passed to the errBack in the deferred calls.
This looks like a very sloppy/incomplete refactoring on my part. I needed to use the various utility methods outside the scope of their original function. I'll take this and fix it. Fixed in http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e25201bef68b75050d3ab7b1da6b49f2c76cd18c Verified that error now shows. I'm retesting all the other progress and error handling in fileCommands in bug 361006. |