diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 17:30:41 +0200 |
| commit | 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 (patch) | |
| tree | ddcc6b14077d90d1b970b67829f07120547dbb62 /src/main/java/com/c2kernel/utils/CastorXMLUtility.java | |
| parent | a139f95bfeca603333b8c0310ae09c6805e58584 (diff) | |
Huge exception overhaul: Merged ClusterStorageException with
PersistencyException. Replaced MembershipException with
InvalidCollectionModification CORBA Exception. Made all predef steps
throw more accurate exceptions when they go wrong, and let more
exceptions bubble through from underneath.
Diffstat (limited to 'src/main/java/com/c2kernel/utils/CastorXMLUtility.java')
| -rw-r--r-- | src/main/java/com/c2kernel/utils/CastorXMLUtility.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/utils/CastorXMLUtility.java b/src/main/java/com/c2kernel/utils/CastorXMLUtility.java index 1596a63..81a8e64 100644 --- a/src/main/java/com/c2kernel/utils/CastorXMLUtility.java +++ b/src/main/java/com/c2kernel/utils/CastorXMLUtility.java @@ -38,7 +38,7 @@ import org.exolab.castor.xml.Unmarshaller; import org.exolab.castor.xml.ValidationException;
import org.exolab.castor.xml.XMLContext;
-import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.InvalidData;
import com.c2kernel.persistency.outcome.Outcome;
import com.c2kernel.process.resource.ResourceLoader;
@@ -66,11 +66,11 @@ public class CastorXMLUtility * configuration
* @param mapURL
* the root URL for the mapfiles
- * @throws InvalidDataException
+ * @throws InvalidData
*/
public CastorXMLUtility(final ResourceLoader aResourceLoader,
final Properties aAppProperties, final URL mapURL)
- throws InvalidDataException {
+ throws InvalidData {
// load index
@@ -79,7 +79,7 @@ public class CastorXMLUtility try {
index = FileStringUtility.url2String( new URL(mapURL, "index") );
} catch (Exception e) {
- throw new InvalidDataException(String.format("Could not load map index from [%s]",mapURL));
+ throw new InvalidData(String.format("Could not load map index from [%s]",mapURL));
}
// retrieve the class loader of the class "CastorXMLUtility"
@@ -135,13 +135,13 @@ public class CastorXMLUtility mappingContext.addMapping(thisMapping);
} catch (MappingException ex) {
Logger.error(ex);
- throw new InvalidDataException("XML Mapping files are not valid: "+ex.getMessage(), "");
+ throw new InvalidData("XML Mapping files are not valid: "+ex.getMessage());
} catch (MalformedURLException ex) {
Logger.error(ex);
- throw new InvalidDataException("Mapping file location invalid: "+ex.getMessage(), "");
+ throw new InvalidData("Mapping file location invalid: "+ex.getMessage());
} catch (IOException ex) {
Logger.error(ex);
- throw new InvalidDataException("Could not read XML mapping files: "+ex.getMessage(), "");
+ throw new InvalidData("Could not read XML mapping files: "+ex.getMessage());
}
Logger.msg(1, String.format("Loaded [%d] maps from [%s]", loadedMapURLs.size(), mapURL));
|
