Author: adietish
Date: 2011-10-17 10:04:06 -0400 (Mon, 17 Oct 2011)
New Revision: 35721
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
Log:
[JBIDE-9889] catching auth exception
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-10-17
13:54:56 UTC (rev 35720)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-10-17
14:04:06 UTC (rev 35721)
@@ -52,28 +52,34 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
+ IStatus status = Status.OK_STATUS;
try {
File repositoryFile = model.cloneRepository(monitor);
model.importProject(repositoryFile, monitor);
- return Status.OK_STATUS;
} catch (OpenshiftException e) {
- return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
+ status = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
"An exception occurred while creating local git repository.", e);
} catch (URISyntaxException e) {
- return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
+ status = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
"The url of the remote git repository is not valid", e);
- } catch(InvocationTargetException e) {
+ } catch (InvocationTargetException e) {
if (e.getTargetException() instanceof JGitInternalException) {
- return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
- "Could not clone the repository. Authentication failed.",
e.getTargetException());
- } else {
- return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
+ status = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
+ "Could not clone the repository. Authentication failed.", e
+ .getTargetException());
+ } else {
+ status = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
"An exception occurred while creating local git repository.", e);
}
} catch (Exception e) {
- return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
+ status = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
"An exception occurred while creating local git repository.", e);
}
+
+ if (!status.isOK()) {
+ OpenshiftUIActivator.log(status);
+ }
+ return status;
}
}, getContainer());
return true;
Show replies by date