You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by jw...@apache.org on 2014/02/24 15:59:37 UTC

svn commit: r1571309 - /aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java

Author: jwross
Date: Mon Feb 24 14:59:37 2014
New Revision: 1571309

URL: http://svn.apache.org/r1571309
Log:
Improve error message when a content resource or dependency cannot be found.

The message now mentions the cause of this error, which is either (1) the resource was missing, or (2) the resource was
present but not recognized as a supported format. The latter can occur, for example, due to an invalid bundle manifest or
blueprint XML file. This complements the new debug output introduced in
http://svn.apache.org/viewvc?view=revision&revision=1569792.

Modified:
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java?rev=1571309&r1=1571308&r2=1571309&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java Mon Feb 24 14:59:37 2014
@@ -381,7 +381,7 @@ public class SubsystemResource implement
 			Resource resource = findContent(requirement);
 			if (resource == null) {
 				if (clause.isMandatory())
-					throw new SubsystemException("Resource does not exist: "+ requirement);
+					throw new SubsystemException("A required content resource could not be found. This means the resource was either missing or not recognized as a supported resource format due to, for example, an invalid bundle manifest or blueprint XML file. Turn on debug logging for more information. The resource was: " + requirement);
 				continue;
 			}
 			addContentResource(resource);
@@ -398,7 +398,7 @@ public class SubsystemResource implement
 			for (ProvisionResourceHeader.Clause clause : header.getClauses()) {
 				Resource resource = findDependency(clause);
 				if (resource == null)
-					throw new SubsystemException("Resource does not exist: " + clause);
+					throw new SubsystemException("A required dependency could not be found. This means the resource was either missing or not recognized as a supported resource format due to, for example, an invalid bundle manifest or blueprint XML file. Turn on debug logging for more information. The resource was: " + resource);
 				addDependency(resource);
 			}
 		}