Author: marrs
Date: Mon Jul 1 21:29:40 2013
New Revision: 1498701
URL: http://svn.apache.org/r1498701
Log:
Improved logging and exception messages when storing an artifact in the OBR
fails.
Modified:
ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java
Modified:
ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java?rev=1498701&r1=1498700&r2=1498701&view=diff
==============================================================================
---
ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java
(original)
+++
ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/storage/file/BundleFileStore.java
Mon Jul 1 21:29:40 2013
@@ -96,14 +96,15 @@ public class BundleFileStore implements
metaData = ResourceMetaData.getArtifactMetaData(fileName);
}
if (metaData == null) {
- throw new IOException("Not a valid bundle and no filename found");
+ throw new IOException("Not a valid bundle and no filename found
(filename = " + fileName + ")");
}
File storeLocation = getResourceFile(metaData);
if (storeLocation == null) {
- throw new IOException("Failed to store resource");
+ throw new IOException("Failed to store resource (filename = " +
fileName + ")");
}
if (storeLocation.exists()) {
+ m_log.log(LogService.LOG_ERROR, "Resource already existed in OBR
(filename = " + fileName + ")");
return null;
}