ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r991483 - /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
Date Wed, 01 Sep 2010 09:06:18 GMT
Author: hibou
Date: Wed Sep  1 09:06:18 2010
New Revision: 991483

URL: http://svn.apache.org/viewvc?rev=991483&view=rev
Log:
Handle an unexpected exception

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java?rev=991483&r1=991482&r2=991483&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
Wed Sep  1 09:06:18 2010
@@ -124,7 +124,13 @@ public class IvyResolveJob extends Job {
 
             // The version matcher used will be the one configured for the first project
             ResolveRequest request = (ResolveRequest) inworkspaceModules.values().iterator().next();
-            Ivy ivy = request.getContainer().getState().getCachedIvy();
+            Ivy ivy;
+            try {
+                // here we expect to find the ivy and the md we have just computed
+                ivy = request.getContainer().getState().getCachedIvy();
+            } catch (IvyDEException e) {
+                return new Status(IStatus.ERROR, IvyPlugin.ID, "Unexpected error");
+            }
             VersionMatcher versionMatcher = ivy.getSettings().getVersionMatcher();
 
             WarningNonMatchingVersionReporter nonMatchingVersionReporter = new WarningNonMatchingVersionReporter();



Mime
View raw message