directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r923827 - /directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java
Date Tue, 16 Mar 2010 16:00:23 GMT
Author: elecharny
Date: Tue Mar 16 16:00:23 2010
New Revision: 923827

URL: http://svn.apache.org/viewvc?rev=923827&view=rev
Log:
Exceptions fixed

Modified:
    directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java

Modified: directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java?rev=923827&r1=923826&r2=923827&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java
(original)
+++ directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java
Tue Mar 16 16:00:23 2010
@@ -35,10 +35,10 @@ import java.util.UUID;
 import java.util.Map.Entry;
 import java.util.regex.Pattern;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.ldif.LdapLdifException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
@@ -234,7 +234,14 @@ public class DefaultSchemaLdifExtractor 
             out.write( ldifString );
             out.flush();
         }
-        catch ( NamingException ne )
+        catch ( LdapLdifException ne )
+        {
+            // throw an exception : we should not have more than one entry per schema ldif
file
+            String msg = I18n.err( I18n.ERR_08004, source, ne.getLocalizedMessage() );
+            LOG.error( msg );
+            throw new InvalidObjectException( msg );
+        }
+        catch ( LdapException ne )
         {
             // throw an exception : we should not have more than one entry per schema ldif
file
             String msg = I18n.err( I18n.ERR_08004, source, ne.getLocalizedMessage() );



Mime
View raw message