[jbosstools-commits] JBoss Tools SVN: r35720 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Oct 17 09:54:56 EDT 2011


Author: adietish
Date: 2011-10-17 09:54:56 -0400 (Mon, 17 Oct 2011)
New Revision: 35720

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:47:58 UTC (rev 35719)
+++ 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)
@@ -11,6 +11,7 @@
 package org.jboss.tools.openshift.express.internal.ui.wizard;
 
 import java.io.File;
+import java.lang.reflect.InvocationTargetException;
 import java.net.URISyntaxException;
 
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -20,6 +21,7 @@
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jgit.api.errors.JGitInternalException;
 import org.eclipse.ui.INewWizard;
 import org.eclipse.ui.IWorkbench;
 import org.jboss.tools.common.ui.WizardUtils;
@@ -60,6 +62,14 @@
 							} catch (URISyntaxException e) {
 								return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
 										"The url of the remote git repository is not valid", 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,
+											"An exception occurred while creating local git repository.", e);
+								}
 							} catch (Exception e) {
 								return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
 										"An exception occurred while creating local git repository.", e);



More information about the jbosstools-commits mailing list