From 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 3 Oct 2014 17:30:41 +0200 Subject: 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. --- src/main/java/com/c2kernel/utils/CastorXMLUtility.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/com/c2kernel/utils/CastorXMLUtility.java') 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)); -- cgit v1.2.3