You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ja...@apache.org on 2013/11/01 11:56:39 UTC
svn commit: r1537895 -
/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
Author: jawi
Date: Fri Nov 1 10:56:38 2013
New Revision: 1537895
URL: http://svn.apache.org/r1537895
Log:
When not able to create a new distribution for a target, throw an IOException instead of an IllegalStateException, as this it is not a state-problem, but a user problem.
Modified:
ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
Modified: ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java?rev=1537895&r1=1537894&r2=1537895&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java (original)
+++ ace/trunk/org.apache.ace.client.repository/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java Fri Nov 1 10:56:38 2013
@@ -557,7 +557,7 @@ public class StatefulTargetRepositoryImp
ArtifactObject bundle = allProcessors.get(processor);
if (bundle == null) {
m_log.log(LogService.LOG_ERROR, "Unable to create deployment version: there is no resource processing bundle available that publishes " + processor);
- throw new IllegalStateException("Unable to create deployment version: there is no resource processing bundle available that publishes " + processor);
+ throw new IOException("Unable to create deployment version: there is no resource processing bundle available that publishes " + processor);
}
bundles.put(bundle, processor);
}
@@ -670,13 +670,13 @@ public class StatefulTargetRepositoryImp
if (!m_bundleHelper.canUse(artifact)) {
String processorPID = artifact.getProcessorPID();
if (processorPID == null) {
- m_log.log(LogService.LOG_ERROR, "Cannot gather necessary artifacts: no processor PID defined for " + artifact.getName());
+ m_log.log(LogService.LOG_WARNING, "Cannot gather necessary artifacts: no processor PID defined for " + artifact.getName());
return null;
}
ArtifactObject processor = allProcessors.get(processorPID);
if (processor == null) {
// this means we cannot create a useful version; return null.
- m_log.log(LogService.LOG_ERROR, "Cannot gather necessary artifacts: failed to find resource processor named '" + artifact.getProcessorPID() + "' for artifact '" + artifact.getName() + "'!");
+ m_log.log(LogService.LOG_WARNING, "Cannot gather necessary artifacts: failed to find resource processor named '" + artifact.getProcessorPID() + "' for artifact '" + artifact.getName() + "'!");
return null;
}
result.add(processor);