directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1126274 [1/2] - in /directory/shared/trunk/ldap: client/api/src/main/java/org/apache/directory/ldap/client/api/ client/api/src/main/java/org/apache/directory/ldap/client/api/exception/ model/src/main/java/org/apache/directory/shared/ldap/m...
Date Sun, 22 May 2011 23:11:06 GMT
Author: elecharny
Date: Sun May 22 23:11:04 2011
New Revision: 1126274

URL: http://svn.apache.org/viewvc?rev=1126274&view=rev
Log:
Applied patch from DIRSHARED-123

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeTypeException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeValueException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchAttributeException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOperationException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOtherException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapProtocolErrorException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaViolationException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapURLEncodingException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnwillingToPerformException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUriException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/UrlDecoderException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdapLdifException.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Ava.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/ComplexDnParser.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AttributeType.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MatchingRule.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimNormalizer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimToLowerNormalizer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/GeneralizedTimeNormalizer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/NumericNormalizer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableAttributeTypeRegistry.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/url/LdapUrl.java
    directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Sun May 22 23:11:04 2011
@@ -535,6 +535,13 @@ public class LdapNetworkConnection exten
                 // Nothing to do
             }
 
+            Throwable e = connectionFuture.getException();
+            
+            if ( e != null )
+            {
+                throw new InvalidConnectionException( "Cannot connect on the server: " + e.getMessage(), e );
+            }
+
             return false;
         }
 
@@ -750,14 +757,12 @@ public class LdapNetworkConnection exten
 
             // We didn't received anything : this is an error
             LOG.error( "Add failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
             // Send an abandon request
             if ( !addFuture.isCancelled() )
@@ -765,7 +770,7 @@ public class LdapNetworkConnection exten
                 abandon( addRequest.getMessageId() );
             }
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -1158,15 +1163,13 @@ public class LdapNetworkConnection exten
         {
             // We didn't received anything : this is an error
             LOG.error( "Bind failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -1206,10 +1209,8 @@ public class LdapNetworkConnection exten
         {
             String msg = "The given dn '" + name + "' is not valid";
             LOG.error( msg );
-            LdapException ldapException = new LdapException( msg );
-            ldapException.initCause( ine );
 
-            throw ldapException;
+            throw new LdapException( msg, ine );
         }
     }
 
@@ -1346,16 +1347,14 @@ public class LdapNetworkConnection exten
         {
             // We didn't received anything : this is an error
             LOG.error( "Bind failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -1427,16 +1426,14 @@ public class LdapNetworkConnection exten
         {
             // We didn't received anything : this is an error
             LOG.error( "Bind failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -1508,16 +1505,14 @@ public class LdapNetworkConnection exten
         {
             // We didn't received anything : this is an error
             LOG.error( "Bind failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -2203,6 +2198,7 @@ public class LdapNetworkConnection exten
         modReq.setName( entry.getDn() );
 
         Iterator<Attribute> itr = entry.iterator();
+        
         while ( itr.hasNext() )
         {
             modReq.addModification( itr.next(), modOp );
@@ -2312,14 +2308,12 @@ public class LdapNetworkConnection exten
 
             // We didn't received anything : this is an error
             LOG.error( "Modify failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( ie.getMessage() );
-            ldapException.initCause( ie );
 
             // Send an abandon request
             if ( !modifyFuture.isCancelled() )
@@ -2327,7 +2321,7 @@ public class LdapNetworkConnection exten
                 abandon( modRequest.getMessageId() );
             }
 
-            throw ldapException;
+            throw new LdapException( ie.getMessage(), ie );
         }
     }
 
@@ -2628,14 +2622,12 @@ public class LdapNetworkConnection exten
 
             // We didn't received anything : this is an error
             LOG.error( "Modify failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
             // Send an abandon request
             if ( !modifyDnFuture.isCancelled() )
@@ -2643,7 +2635,7 @@ public class LdapNetworkConnection exten
                 abandon( modDnRequest.getMessageId() );
             }
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -2828,14 +2820,12 @@ public class LdapNetworkConnection exten
 
             // We didn't received anything : this is an error
             LOG.error( "Del failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
             // Send an abandon request
             if ( !deleteFuture.isCancelled() )
@@ -2843,7 +2833,7 @@ public class LdapNetworkConnection exten
                 abandon( deleteRequest.getMessageId() );
             }
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -3020,14 +3010,12 @@ public class LdapNetworkConnection exten
 
             // We didn't received anything : this is an error
             LOG.error( "Compare failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
             // Send an abandon request
             if ( !compareFuture.isCancelled() )
@@ -3035,7 +3023,7 @@ public class LdapNetworkConnection exten
                 abandon( compareRequest.getMessageId() );
             }
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -3177,14 +3165,12 @@ public class LdapNetworkConnection exten
 
             // We didn't received anything : this is an error
             LOG.error( "Extended failed : timeout occured" );
-            throw new LdapException( TIME_OUT_ERROR );
+            throw new LdapException( TIME_OUT_ERROR, te );
         }
         catch ( Exception ie )
         {
             // Catch all other exceptions
             LOG.error( NO_RESPONSE_ERROR, ie );
-            LdapException ldapException = new LdapException( NO_RESPONSE_ERROR );
-            ldapException.initCause( ie );
 
             // Send an abandon request
             if ( !extendedFuture.isCancelled() )
@@ -3192,7 +3178,7 @@ public class LdapNetworkConnection exten
                 abandon( extendedRequest.getMessageId() );
             }
 
-            throw ldapException;
+            throw new LdapException( NO_RESPONSE_ERROR, ie );
         }
     }
 
@@ -3482,6 +3468,7 @@ public class LdapNetworkConnection exten
 
             List<AttributeType> atList = olsp.getAttributeTypes();
             AttributeTypeRegistry atRegistry = schemaManager.getRegistries().getAttributeTypeRegistry();
+            
             for ( AttributeType atType : atList )
             {
                 atRegistry.addMappingFor( atType );
@@ -3489,6 +3476,7 @@ public class LdapNetworkConnection exten
 
             List<ObjectClass> ocList = olsp.getObjectClassTypes();
             ObjectClassRegistry ocRegistry = schemaManager.getRegistries().getObjectClassRegistry();
+            
             for ( ObjectClass oc : ocList )
             {
                 ocRegistry.register( oc );

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java (original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java Sun May 22 23:11:04 2011
@@ -104,8 +104,7 @@ public class SearchCursorImpl extends Ab
         }
         catch ( Exception e )
         {
-            LdapException ldapException = new LdapException( LdapNetworkConnection.NO_RESPONSE_ERROR );
-            ldapException.initCause( e );
+            LdapException ldapException = new LdapException( LdapNetworkConnection.NO_RESPONSE_ERROR, e );
 
             // Send an abandon request
             if ( !future.isCancelled() )

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java (original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java Sun May 22 23:11:04 2011
@@ -52,4 +52,16 @@ public class InvalidConnectionException 
     {
         super( explanation );
     }
+
+
+    /**
+     * Instantiates a new invalid connection exception.
+     *
+     * @param explanation the explanation
+     * @param cause The root cause for this exception
+     */
+    public InvalidConnectionException( String explanation, Throwable cause )
+    {
+        super( explanation, cause );
+    }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AbstractValue.java Sun May 22 23:11:04 2011
@@ -203,7 +203,7 @@ public abstract class AbstractValue<T> i
         {
             String message = I18n.err( I18n.ERR_04447_CANNOT_NORMALIZE_VALUE, le.getLocalizedMessage() );
             LOG.info( message );
-            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message, le );
         }
         
         // Rehash the Value now

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java Sun May 22 23:11:04 2011
@@ -477,7 +477,7 @@ public final class AttributeUtils
             }
             catch ( LdapException ne )
             {
-                throw new LdapInvalidAttributeTypeException( ne.getMessage() );
+                throw new LdapInvalidAttributeTypeException( ne.getMessage(), ne );
             }
         }
         else

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeTypeException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeTypeException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeTypeException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeTypeException.java Sun May 22 23:11:04 2011
@@ -37,6 +37,15 @@ public class LdapInvalidAttributeTypeExc
 
     /**
      * Creates a new instance of LdapInvalidAttributeTypeException.
+     */
+    public LdapInvalidAttributeTypeException()
+    {
+        super( ResultCodeEnum.UNDEFINED_ATTRIBUTE_TYPE, null );
+    }
+
+
+    /**
+     * Creates a new instance of LdapInvalidAttributeTypeException.
      *
      * @param message The exception message
      */
@@ -48,9 +57,12 @@ public class LdapInvalidAttributeTypeExc
 
     /**
      * Creates a new instance of LdapInvalidAttributeTypeException.
+     * 
+     * @param message The exception message
+     * @param cause The root cause for this exception
      */
-    public LdapInvalidAttributeTypeException()
+    public LdapInvalidAttributeTypeException( String message, Throwable cause )
     {
-        super( ResultCodeEnum.UNDEFINED_ATTRIBUTE_TYPE, null );
+        super( ResultCodeEnum.UNDEFINED_ATTRIBUTE_TYPE, message, cause );
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeValueException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeValueException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeValueException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidAttributeValueException.java Sun May 22 23:11:04 2011
@@ -63,6 +63,21 @@ public class LdapInvalidAttributeValueEx
 
 
     /**
+     * Creates a new instance of LdapInvalidAttributeValueException.
+     * 
+     * @param resultCode the ResultCodeEnum for this exception
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapInvalidAttributeValueException( ResultCodeEnum resultCode, String message, Throwable cause )
+    {
+        super( message, cause );
+        checkResultCode( resultCode );
+        this.resultCode = resultCode;
+    }
+
+
+    /**
      * Checks to make sure the resultCode value is right for this exception
      * type.
      * 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapInvalidDnException.java Sun May 22 23:11:04 2011
@@ -42,6 +42,18 @@ public class LdapInvalidDnException exte
     {
         super( message );
     }
+
+    
+    /**
+     * to be used by some special exceptions like LdapInvalidDnException
+     * 
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapInvalidDnException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
     
     
     /**
@@ -60,6 +72,21 @@ public class LdapInvalidDnException exte
 
     /**
      * Creates a new instance of LdapInvalidDnException.
+     *
+     * @param resultCode the ResultCodeEnum for this exception
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapInvalidDnException(  ResultCodeEnum resultCode, String message, Throwable cause )
+    {
+        super( message, cause );
+        checkResultCode( resultCode );
+        this.resultCode = resultCode;
+    }
+
+
+    /**
+     * Creates a new instance of LdapInvalidDnException.
      * 
      * @param resultCode the ResultCodeEnum for this exception
      */

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchAttributeException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchAttributeException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchAttributeException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapNoSuchAttributeException.java Sun May 22 23:11:04 2011
@@ -47,6 +47,18 @@ public class LdapNoSuchAttributeExceptio
 
     /**
      * Creates a new instance of LdapNoSuchAttributeException.
+     *
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapNoSuchAttributeException( String message, Throwable cause )
+    {
+        super( ResultCodeEnum.NO_SUCH_ATTRIBUTE, message, cause );
+    }
+
+    
+    /**
+     * Creates a new instance of LdapNoSuchAttributeException.
      */
     public LdapNoSuchAttributeException()
     {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOperationException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOperationException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOperationException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOperationException.java Sun May 22 23:11:04 2011
@@ -99,6 +99,18 @@ public class LdapOperationException exte
 
 
     /**
+     * Creates a new instance of LdapOperationException.
+     *
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapOperationException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+
+    /**
      * Gets the LDAP result code that would be associated with this exception.
      * 
      * @return the LDAP result code corresponding to this exception type.

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOtherException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOtherException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOtherException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapOtherException.java Sun May 22 23:11:04 2011
@@ -47,6 +47,18 @@ public class LdapOtherException extends 
 
     /**
      * Creates a new instance of LdapOtherException.
+     *
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapOtherException( String message, Throwable cause )
+    {
+        super( ResultCodeEnum.OTHER, message, cause );
+    }
+
+
+    /**
+     * Creates a new instance of LdapOtherException.
      */
     public LdapOtherException()
     {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapProtocolErrorException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapProtocolErrorException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapProtocolErrorException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapProtocolErrorException.java Sun May 22 23:11:04 2011
@@ -44,6 +44,17 @@ public class LdapProtocolErrorException 
         super( ResultCodeEnum.PROTOCOL_ERROR, message );
     }
 
+    /**
+     * Creates a new instance of LdapProtocolErrorException.
+     *
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapProtocolErrorException( String message, Throwable cause )
+    {
+        super( ResultCodeEnum.PROTOCOL_ERROR, message, cause );
+    }
+
 
     /**
      * Creates a new instance of LdapProtocolErrorException.

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java Sun May 22 23:11:04 2011
@@ -85,10 +85,8 @@ public class LdapSchemaException extends
     /**
      * Creates a new instance of LdapSchemaException.
      *
-     * @param code
-     *      The code of the exception
-     * @param explanation
-     *      The message associated with the exception
+     * @param code The code of the exception
+     * @param explanation The message associated with the exception
      */
     public LdapSchemaException( LdapSchemaExceptionCodes code, String explanation )
     {
@@ -98,6 +96,32 @@ public class LdapSchemaException extends
 
 
     /**
+     *
+     * @param code The code of the exception
+     * @param cause The root cause for this exception
+     */
+    public LdapSchemaException( LdapSchemaExceptionCodes code, Throwable cause )
+    {
+        super(cause);
+        this.code = code;
+    }
+
+    
+    /**
+     * Creates a new instance of LdapSchemaException.
+     *
+     * @param code The code of the exception
+     * @param explanation The message associated with the exception
+     * @param cause The root cause for this exception
+     */
+    public LdapSchemaException( LdapSchemaExceptionCodes code, String explanation, Throwable cause )
+    {
+        super( explanation, cause );
+        this.code = code;
+    }
+
+    
+    /**
      * Gets the code of the exception.
      *
      * @return

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaViolationException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaViolationException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaViolationException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaViolationException.java Sun May 22 23:11:04 2011
@@ -50,6 +50,20 @@ public class LdapSchemaViolationExceptio
 
 
     /**
+     *
+     * @param resultCode the ResultCodeEnum for this exception
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapSchemaViolationException( ResultCodeEnum resultCode, String message, Throwable cause )
+    {
+        super( message, cause );
+        checkResultCode( resultCode );
+        this.resultCode = resultCode;
+    }
+    
+    
+    /**
      * Creates a new instance of LdapSchemaViolationException.
      * 
      * @param resultCode the ResultCodeEnum for this exception

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapURLEncodingException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapURLEncodingException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapURLEncodingException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapURLEncodingException.java Sun May 22 23:11:04 2011
@@ -34,10 +34,22 @@ public class LdapURLEncodingException ex
     /**
      * Creates a LdapStringEncodingException
      * 
-     * @param pMessage A message with meaning to a human
+     * @param message A message with meaning to a human
      */
-    public LdapURLEncodingException( String pMessage )
+    public LdapURLEncodingException( String message )
     {
-        super( pMessage );
+        super( message );
+    }
+
+    
+    /**
+     * Creates a LdapStringEncodingException
+     * 
+     * @param message A message with meaning to a human
+     * @param cause The root cause for this exception
+     */
+    public LdapURLEncodingException( String message, Throwable cause )
+    {
+        super( message, cause );
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnwillingToPerformException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnwillingToPerformException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnwillingToPerformException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUnwillingToPerformException.java Sun May 22 23:11:04 2011
@@ -57,6 +57,20 @@ public class LdapUnwillingToPerformExcep
         checkResultCode( resultCode );
         this.resultCode = resultCode;
     }
+    
+    
+    /**
+     *
+     * @param resultCode the ResultCodeEnum for this exception
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapUnwillingToPerformException( ResultCodeEnum resultCode, String message, Throwable cause )
+    {
+        super( message, cause );
+        checkResultCode( resultCode );
+        this.resultCode = resultCode;
+    }
 
 
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUriException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUriException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUriException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapUriException.java Sun May 22 23:11:04 2011
@@ -29,23 +29,19 @@ public class LdapUriException extends Ld
 {
     private static final long serialVersionUID = 1L;
 
-
-    // ----------------------------------------------------------- constructors
     /**
      * The constructor with a reason string argument.
      * 
-     * @param reason
-     *            the reason
+     * @param reason the reason
+     * @param cause the root cause
      */
-    public LdapUriException(String reason)
+    public LdapUriException( String reason, Throwable cause )
     {
-        super( reason ); // for backward compatibility of Throwable
+        super( reason, cause ); // for backward compatibility of Throwable
         this.reason = reason;
         this.reasonCode = UNKNOWN;
     }
 
-    // -------------------------------------------------------------- constants
-
     /**
      * No specified reason code.
      */
@@ -70,7 +66,6 @@ public class LdapUriException extends Ld
      * The DNS punycode encoding or decoding error.
      */
     // public static final int PUNYCODE = 4;
-    // ------------------------------------------------------------- properties
     /**
      * The reason code.
      */
@@ -82,8 +77,6 @@ public class LdapUriException extends Ld
     protected String reason;
 
 
-    // ---------------------------------------------------------------- methods
-
     /**
      * Get the reason code.
      * 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/UrlDecoderException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/UrlDecoderException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/UrlDecoderException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/UrlDecoderException.java Sun May 22 23:11:04 2011
@@ -30,16 +30,25 @@ public class UrlDecoderException extends
 {
     private static final long serialVersionUID = 1L;
 
-
     /**
      * Creates a DecoderException
      * 
-     * @param pMessage
-     *            A message with meaning to a human
+     * @param message A message with meaning to a human
      */
-    public UrlDecoderException(String pMessage)
+    public UrlDecoderException( String message )
     {
-        super( pMessage );
+        super( message );
     }
 
+
+    /**
+     * Creates a DecoderException
+     * 
+     * @param message A message with meaning to a human
+     * @param cause The root cause for this exception
+     */
+    public UrlDecoderException( String message, Throwable cause )
+    {
+        super( message, cause  );
+    }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdapLdifException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdapLdifException.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdapLdifException.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdapLdifException.java Sun May 22 23:11:04 2011
@@ -43,4 +43,16 @@ public class LdapLdifException extends L
     {
         super( message );
     }
+
+
+    /**
+     * Creates a new instance of LdapLdifException.
+     *
+     * @param message The exception message
+     * @param cause The root cause for this exception
+     */
+    public LdapLdifException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java Sun May 22 23:11:04 2011
@@ -278,7 +278,7 @@ public class LdifAttributesReader extend
                 }
                 catch ( LdapException le )
                 {
-                    throw new LdapLdifException( I18n.err( I18n.ERR_12057_BAD_ATTRIBUTE ) );
+                    throw new LdapLdifException( I18n.err( I18n.ERR_12057_BAD_ATTRIBUTE ), le );
                 }
             }
         }
@@ -297,7 +297,7 @@ public class LdifAttributesReader extend
             }
             catch ( LdapInvalidAttributeValueException liave )
             {
-                throw new LdapLdifException( liave.getMessage() );
+                throw new LdapLdifException( liave.getMessage(), liave );
             }
         }
     }
@@ -475,7 +475,7 @@ public class LdifAttributesReader extend
         catch ( LdapLdifException ne )
         {
             LOG.error( I18n.err( I18n.ERR_12008_CANNOT_PARSE_LDIF_BUFFER, ne.getLocalizedMessage() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12009_ERROR_PARSING_LDIF_BUFFER ) );
+            throw new LdapLdifException( I18n.err( I18n.ERR_12009_ERROR_PARSING_LDIF_BUFFER ), ne );
         }
         finally
         {
@@ -485,7 +485,7 @@ public class LdifAttributesReader extend
             }
             catch ( IOException ioe )
             {
-                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ) );
+                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ), ioe );
             }
         }
     }
@@ -539,7 +539,7 @@ public class LdifAttributesReader extend
         catch ( LdapLdifException ne )
         {
             LOG.error( I18n.err( I18n.ERR_12008_CANNOT_PARSE_LDIF_BUFFER, ne.getLocalizedMessage() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12009_ERROR_PARSING_LDIF_BUFFER ) );
+            throw new LdapLdifException( I18n.err( I18n.ERR_12009_ERROR_PARSING_LDIF_BUFFER ), ne );
         }
         finally
         {
@@ -549,7 +549,7 @@ public class LdifAttributesReader extend
             }
             catch ( IOException ioe )
             {
-                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ) );
+                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ), ioe );
             }
         }
     }
@@ -604,7 +604,7 @@ public class LdifAttributesReader extend
         catch ( LdapLdifException ne )
         {
             LOG.error( I18n.err( I18n.ERR_12008_CANNOT_PARSE_LDIF_BUFFER, ne.getLocalizedMessage() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12009_ERROR_PARSING_LDIF_BUFFER ) );
+            throw new LdapLdifException( I18n.err( I18n.ERR_12009_ERROR_PARSING_LDIF_BUFFER ), ne );
         }
         finally
         {
@@ -614,7 +614,7 @@ public class LdifAttributesReader extend
             }
             catch ( IOException ioe )
             {
-                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ) );
+                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ), ioe );
             }
         }
     }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java Sun May 22 23:11:04 2011
@@ -43,8 +43,8 @@ import java.util.NoSuchElementException;
 
 import org.apache.directory.shared.asn1.util.Oid;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
@@ -287,15 +287,15 @@ public class LdifReader implements Itera
         {
             String msg = I18n.err( I18n.ERR_12010_CANNOT_FIND_FILE, file.getAbsoluteFile() );
             LOG.error( msg );
-            throw new LdapLdifException( msg );
+            throw new LdapLdifException( msg, fnfe );
         }
         catch ( LdapInvalidDnException lide )
         {
-            throw new LdapLdifException( lide.getMessage() );
+            throw new LdapLdifException( lide.getMessage(), lide);
         }
         catch ( LdapException le )
         {
-            throw new LdapLdifException( le.getMessage() );
+            throw new LdapLdifException( le.getMessage(), le );
         }
     }
 
@@ -354,15 +354,15 @@ public class LdifReader implements Itera
         {
             String msg = I18n.err( I18n.ERR_12010_CANNOT_FIND_FILE, file.getAbsoluteFile() );
             LOG.error( msg );
-            throw new LdapLdifException( msg );
+            throw new LdapLdifException( msg , fnfe);
         }
         catch ( LdapInvalidDnException lide )
         {
-            throw new LdapLdifException( lide.getMessage() );
+            throw new LdapLdifException( lide.getMessage(), lide );
         }
         catch ( LdapException le )
         {
-            throw new LdapLdifException( le.getMessage() );
+            throw new LdapLdifException( le.getMessage(), le );
         }
     }
 
@@ -520,7 +520,7 @@ public class LdifReader implements Itera
                     {
                         // The Dn is not base 64 encoded
                         LOG.error( I18n.err( I18n.ERR_12014_BASE64_DN_EXPECTED ) );
-                        throw new LdapLdifException( I18n.err( I18n.ERR_12015_INVALID_BASE64_DN ) );
+                        throw new LdapLdifException( I18n.err( I18n.ERR_12015_INVALID_BASE64_DN ), uee );
                     }
                 }
                 else
@@ -651,12 +651,12 @@ public class LdifReader implements Itera
                                     // existence has already been
                                     // checked
                                     LOG.error( I18n.err( I18n.ERR_12018_FILE_NOT_FOUND, fileName ) );
-                                    throw new LdapLdifException( I18n.err( I18n.ERR_12019_BAD_URL_FILE_NOT_FOUND ) );
+                                    throw new LdapLdifException( I18n.err( I18n.ERR_12019_BAD_URL_FILE_NOT_FOUND ), fnfe );
                                 }
                                 catch ( IOException ioe )
                                 {
                                     LOG.error( I18n.err( I18n.ERR_12022_ERROR_READING_FILE, fileName ) );
-                                    throw new LdapLdifException( I18n.err( I18n.ERR_12023_ERROR_READING_BAD_URL ) );
+                                    throw new LdapLdifException( I18n.err( I18n.ERR_12023_ERROR_READING_BAD_URL ), ioe );
                                 }
                                 finally
                                 {
@@ -669,7 +669,7 @@ public class LdifReader implements Itera
                                     }
                                     catch ( IOException ioe )
                                     {
-                                        LOG.error( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE, ioe.getMessage() ) );
+                                        LOG.error( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE, ioe.getMessage() ), ioe );
                                         // Just do nothing ...
                                     }
                                 }
@@ -686,7 +686,7 @@ public class LdifReader implements Itera
                 {
                     String message = I18n.err( I18n.ERR_12027_BAD_URL, urlName );
                     LOG.error( message );
-                    throw new LdapLdifException( message );
+                    throw new LdapLdifException( message, mue );
                 }
             }
             else
@@ -1119,7 +1119,7 @@ public class LdifReader implements Itera
                 }
                 catch ( LdapInvalidAttributeValueException liave )
                 {
-                    throw new LdapLdifException( liave.getMessage() );
+                    throw new LdapLdifException( liave.getMessage(), liave );
                 }
 
                 isEmptyValue = false;
@@ -1446,7 +1446,7 @@ public class LdifReader implements Itera
             catch ( NumberFormatException nfe )
             {
                 LOG.error( I18n.err( I18n.ERR_12060_VERSION_NOT_A_NUMBER ) );
-                throw new LdapLdifException( I18n.err( I18n.ERR_12061_LDIF_PARSING_ERROR ) );
+                throw new LdapLdifException( I18n.err( I18n.ERR_12061_LDIF_PARSING_ERROR ), nfe );
             }
 
             LOG.debug( "Ldif version : {}", versionNumber );
@@ -1561,7 +1561,7 @@ public class LdifReader implements Itera
         }
         catch ( IOException ioe )
         {
-            throw new LdapLdifException( I18n.err( I18n.ERR_12063_ERROR_WHILE_READING_LDIF_LINE ) );
+            throw new LdapLdifException( I18n.err( I18n.ERR_12063_ERROR_WHILE_READING_LDIF_LINE ), ioe );
         }
 
         // Stores the current line if necessary.
@@ -1624,11 +1624,11 @@ public class LdifReader implements Itera
         catch ( FileNotFoundException fnfe )
         {
             LOG.error( I18n.err( I18n.ERR_12068, fileName ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12067, fileName ) );
+            throw new LdapLdifException( I18n.err( I18n.ERR_12067, fileName ), fnfe );
         }
         catch ( LdapException le )
         {
-            throw new LdapLdifException( le.getMessage() );
+            throw new LdapLdifException( le.getMessage(), le );
         }
         finally
         {
@@ -1683,11 +1683,11 @@ public class LdifReader implements Itera
         catch ( LdapLdifException ne )
         {
             LOG.error( I18n.err( I18n.ERR_12069, ne.getLocalizedMessage() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12070 ) );
+            throw new LdapLdifException( I18n.err( I18n.ERR_12070 ), ne );
         }
         catch ( LdapException le )
         {
-            throw new LdapLdifException( le.getMessage() );
+            throw new LdapLdifException( le.getMessage(), le );
         }
         finally
         {
@@ -1698,7 +1698,7 @@ public class LdifReader implements Itera
             }
             catch ( IOException ioe )
             {
-                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ) );
+                throw new LdapLdifException( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE ), ioe );
             }
 
         }
@@ -1890,7 +1890,7 @@ public class LdifReader implements Itera
         }
         catch ( NoSuchElementException nsee )
         {
-            throw new LdapLdifException( I18n.err( I18n.ERR_12072, error.getLocalizedMessage() ) );
+            throw new LdapLdifException( I18n.err( I18n.ERR_12072, error.getLocalizedMessage() ), nsee );
         }
 
         return entries;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java Sun May 22 23:11:04 2011
@@ -171,7 +171,7 @@ public class SearchRequestImpl extends A
         catch ( ParseException pe )
         {
             String msg = "The filter" + filter + " is invalid.";
-            throw new LdapProtocolErrorException( msg );
+            throw new LdapProtocolErrorException( msg, pe );
         }
         
         return this;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Ava.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Ava.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Ava.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Ava.java Sun May 22 23:11:04 2011
@@ -160,7 +160,7 @@ public class Ava implements Externalizab
             {
                 String message =  I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
-                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
+                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message, le );
             }
             
             try
@@ -171,7 +171,7 @@ public class Ava implements Externalizab
             {
                 String message =  I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
-                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
+                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message, liave );
             }
         }
         else
@@ -222,7 +222,7 @@ public class Ava implements Externalizab
             {
                 String message =  I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
-                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
+                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message, le );
             }
             
             try
@@ -233,7 +233,7 @@ public class Ava implements Externalizab
             {
                 String message =  I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
-                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
+                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message, liave );
             }
         }
         else
@@ -278,7 +278,7 @@ public class Ava implements Externalizab
         {
             String message =  I18n.err( I18n.ERR_04188 );
             LOG.error( message );
-            throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
+            throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message, le );
         }
 
         this.upValue = upValue;
@@ -462,7 +462,7 @@ public class Ava implements Externalizab
             {
                 String message =  I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
-                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
+                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message, le );
             }
             
             normType = attributeType.getOid();
@@ -485,7 +485,7 @@ public class Ava implements Externalizab
             {
                 String message =  I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
-                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
+                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message, le );
             }
             
             hashCode();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/ComplexDnParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/ComplexDnParser.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/ComplexDnParser.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/ComplexDnParser.java Sun May 22 23:11:04 2011
@@ -53,9 +53,7 @@ import org.apache.directory.shared.ldap.
         }
         catch ( Exception e )
         {
-            LdapInvalidDnException ine = new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, e.getMessage() );
-            ine.initCause( e );
-            throw ine;
+            throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, e.getMessage(), e );
         }
     }
 
@@ -78,9 +76,7 @@ import org.apache.directory.shared.ldap.
         }
         catch ( Exception e )
         {
-            LdapInvalidDnException ine = new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, e.getMessage() );
-            ine.initCause( e );
-            throw ine;
+            throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, e.getMessage(), e );
         }
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java Sun May 22 23:11:04 2011
@@ -1114,7 +1114,7 @@ public class Dn implements Iterable<Rdn>
                 }
                 catch ( LdapException le )
                 {
-                    throw new LdapInvalidDnException( le.getMessage() );
+                    throw new LdapInvalidDnException( le.getMessage(), le );
                 }
             }
             else

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java Sun May 22 23:11:04 2011
@@ -486,7 +486,7 @@ public class Rdn implements Cloneable, E
             }
             catch( LdapException e )
             {
-                throw new LdapInvalidDnException( e.getMessage() );
+                throw new LdapInvalidDnException( e.getMessage(), e );
             }
         }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AttributeType.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AttributeType.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AttributeType.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AttributeType.java Sun May 22 23:11:04 2011
@@ -222,7 +222,7 @@ public class AttributeType extends Abstr
                 String msg = I18n.err( I18n.ERR_04303, superiorOid, getName() );
 
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                    LdapSchemaExceptionCodes.AT_NONEXISTENT_SUPERIOR, msg );
+                    LdapSchemaExceptionCodes.AT_NONEXISTENT_SUPERIOR, msg, e );
                 ldapSchemaException.setSourceObject( this );
                 ldapSchemaException.setRelatedId( superiorOid );
                 errors.add( ldapSchemaException );
@@ -346,7 +346,7 @@ public class AttributeType extends Abstr
                 String msg = I18n.err( I18n.ERR_04306, syntaxOid, getName() );
 
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                    LdapSchemaExceptionCodes.AT_NONEXISTENT_SYNTAX, msg );
+                    LdapSchemaExceptionCodes.AT_NONEXISTENT_SYNTAX, msg, ne );
                 ldapSchemaException.setSourceObject( this );
                 ldapSchemaException.setRelatedId( syntaxOid );
                 errors.add( ldapSchemaException );
@@ -417,7 +417,7 @@ public class AttributeType extends Abstr
                 String msg = I18n.err( I18n.ERR_04308, equalityOid, getName() );
 
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                    LdapSchemaExceptionCodes.AT_NONEXISTENT_EQUALITY_MATCHING_RULE, msg );
+                    LdapSchemaExceptionCodes.AT_NONEXISTENT_EQUALITY_MATCHING_RULE, msg, ne );
                 ldapSchemaException.setSourceObject( this );
                 ldapSchemaException.setRelatedId( equalityOid );
                 errors.add( ldapSchemaException );
@@ -473,7 +473,7 @@ public class AttributeType extends Abstr
                 String msg = I18n.err( I18n.ERR_04310, orderingOid, getName() );
 
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                    LdapSchemaExceptionCodes.AT_NONEXISTENT_ORDERING_MATCHING_RULE, msg );
+                    LdapSchemaExceptionCodes.AT_NONEXISTENT_ORDERING_MATCHING_RULE, msg, ne );
                 ldapSchemaException.setSourceObject( this );
                 ldapSchemaException.setRelatedId( orderingOid );
                 errors.add( ldapSchemaException );
@@ -530,7 +530,7 @@ public class AttributeType extends Abstr
                 String msg = I18n.err( I18n.ERR_04312, substringOid, getName() );
 
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                    LdapSchemaExceptionCodes.AT_NONEXISTENT_SUBSTRING_MATCHING_RULE, msg );
+                    LdapSchemaExceptionCodes.AT_NONEXISTENT_SUBSTRING_MATCHING_RULE, msg, ne );
                 ldapSchemaException.setSourceObject( this );
                 ldapSchemaException.setRelatedId( substringOid );
                 errors.add( ldapSchemaException );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MatchingRule.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MatchingRule.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MatchingRule.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MatchingRule.java Sun May 22 23:11:04 2011
@@ -160,7 +160,7 @@ public class MatchingRule extends Abstra
                 String msg = I18n.err( I18n.ERR_04317 );
 
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                    LdapSchemaExceptionCodes.MR_NONEXISTENT_SYNTAX, msg );
+                    LdapSchemaExceptionCodes.MR_NONEXISTENT_SYNTAX, msg, ne );
                 ldapSchemaException.setSourceObject( this );
                 ldapSchemaException.setRelatedId( ldapSyntaxOid );
                 errors.add( ldapSchemaException );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java Sun May 22 23:11:04 2011
@@ -191,7 +191,7 @@ public class ObjectClass extends Abstrac
                     String msg = I18n.err( I18n.ERR_04321, oid, superiorName );
 
                     LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                        LdapSchemaExceptionCodes.OC_NONEXISTENT_SUPERIOR, msg );
+                        LdapSchemaExceptionCodes.OC_NONEXISTENT_SUPERIOR, msg, ne );
                     ldapSchemaException.setSourceObject( this );
                     ldapSchemaException.setRelatedId( superiorName );
                     errors.add( ldapSchemaException );
@@ -250,7 +250,7 @@ public class ObjectClass extends Abstrac
                     String msg = I18n.err( I18n.ERR_04323, oid, mayAttributeTypeName );
 
                     LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                        LdapSchemaExceptionCodes.OC_NONEXISTENT_MAY_AT, msg );
+                        LdapSchemaExceptionCodes.OC_NONEXISTENT_MAY_AT, msg, ne );
                     ldapSchemaException.setSourceObject( this );
                     ldapSchemaException.setRelatedId( mayAttributeTypeName );
                     errors.add( ldapSchemaException );
@@ -325,7 +325,7 @@ public class ObjectClass extends Abstrac
                     String msg = I18n.err( I18n.ERR_04326, oid, mustAttributeTypeName );
 
                     LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                        LdapSchemaExceptionCodes.OC_NONEXISTENT_MUST_AT, msg );
+                        LdapSchemaExceptionCodes.OC_NONEXISTENT_MUST_AT, msg, ne );
                     ldapSchemaException.setSourceObject( this );
                     ldapSchemaException.setRelatedId( mustAttributeTypeName );
                     errors.add( ldapSchemaException );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java Sun May 22 23:11:04 2011
@@ -127,7 +127,7 @@ public class ConcreteNameComponentNormal
             {
                 String message = I18n.err( I18n.ERR_04222 );
                 LOG.error( message );
-                throw new LdapException( message );
+                throw new LdapException( message, uee );
             }
         }
         
@@ -156,7 +156,7 @@ public class ConcreteNameComponentNormal
             {
                 String message = I18n.err( I18n.ERR_04223 );
                 LOG.error( message );
-                throw new LdapException( message );
+                throw new LdapException( message, uee );
             }
         }
     }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimNormalizer.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimNormalizer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimNormalizer.java Sun May 22 23:11:04 2011
@@ -77,7 +77,7 @@ public class DeepTrimNormalizer extends 
        }
        catch ( IOException ioe )
        {
-           throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ), ioe );
        }
    }
 
@@ -96,7 +96,7 @@ public class DeepTrimNormalizer extends 
        }
        catch ( IOException ioe )
        {
-           throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ), ioe );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimToLowerNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimToLowerNormalizer.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimToLowerNormalizer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DeepTrimToLowerNormalizer.java Sun May 22 23:11:04 2011
@@ -82,7 +82,7 @@ public class DeepTrimToLowerNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ), ioe );
         }
     }
 
@@ -106,7 +106,7 @@ public class DeepTrimToLowerNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224,  value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224,  value ), ioe );
         }
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/GeneralizedTimeNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/GeneralizedTimeNormalizer.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/GeneralizedTimeNormalizer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/GeneralizedTimeNormalizer.java Sun May 22 23:11:04 2011
@@ -75,7 +75,7 @@ public class GeneralizedTimeNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ), ioe );
         }
     }
 
@@ -97,11 +97,11 @@ public class GeneralizedTimeNormalizer e
         }
         catch ( IOException ioe )
         {
-            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ), ioe );
         }
         catch ( ParseException pe )
         {
-            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
+            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ), pe );
         }
     }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/NumericNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/NumericNormalizer.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/NumericNormalizer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/NumericNormalizer.java Sun May 22 23:11:04 2011
@@ -63,7 +63,7 @@ public class NumericNormalizer extends N
        }
        catch ( IOException ioe )
        {
-           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ), ioe );
        }
    }
 
@@ -80,7 +80,7 @@ public class NumericNormalizer extends N
        }
        catch ( IOException ioe )
        {
-           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ), ioe );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizer.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizer.java Sun May 22 23:11:04 2011
@@ -64,7 +64,7 @@ public class TelephoneNumberNormalizer e
        }
        catch ( IOException ioe )
        {
-           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ), ioe );
        }
    }
 
@@ -81,7 +81,7 @@ public class TelephoneNumberNormalizer e
        }
        catch ( IOException ioe )
        {
-           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
+           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ), ioe );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java Sun May 22 23:11:04 2011
@@ -89,7 +89,7 @@ public class DefaultAttributeTypeRegistr
         }
         catch ( LdapException ne )
         {
-            throw new LdapNoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
         }
     }
 
@@ -125,7 +125,7 @@ public class DefaultAttributeTypeRegistr
         }
         catch ( LdapException ne )
         {
-            throw new LdapNoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
         }
     }
 
@@ -247,7 +247,7 @@ public class DefaultAttributeTypeRegistr
         }
         catch ( LdapException ne )
         {
-            throw new LdapNoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
         }
     }
 
@@ -313,7 +313,7 @@ public class DefaultAttributeTypeRegistr
         }
         catch ( LdapException ne )
         {
-            throw new LdapNoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
         }
     }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java Sun May 22 23:11:04 2011
@@ -70,7 +70,7 @@ public class DefaultObjectClassRegistry 
         }
         catch ( LdapException ne )
         {
-            throw new LdapNoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
         }
     }
 
@@ -95,7 +95,7 @@ public class DefaultObjectClassRegistry 
         }
         catch ( LdapException ne )
         {
-            throw new LdapNoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
         }
     }
 
@@ -134,7 +134,7 @@ public class DefaultObjectClassRegistry 
             }
             catch ( LdapException ne )
             {
-                throw new LdapNoSuchAttributeException( ne.getMessage() );
+                throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
             }
         }
     }
@@ -174,7 +174,7 @@ public class DefaultObjectClassRegistry 
             }
             catch ( LdapException ne )
             {
-                throw new LdapNoSuchAttributeException( ne.getMessage() );
+                throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
             }
         }
     }
@@ -201,7 +201,7 @@ public class DefaultObjectClassRegistry 
         }
         catch ( LdapException ne )
         {
-            throw new LdapNoSuchAttributeException( ne.getMessage() );
+            throw new LdapNoSuchAttributeException( ne.getMessage(), ne );
         }
     }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableAttributeTypeRegistry.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableAttributeTypeRegistry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableAttributeTypeRegistry.java Sun May 22 23:11:04 2011
@@ -229,7 +229,7 @@ public class ImmutableAttributeTypeRegis
         }
         catch ( LdapException le )
         {
-            throw new LdapNoSuchAttributeException( le.getMessage() );
+            throw new LdapNoSuchAttributeException( le.getMessage() , le);
         }
     }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java Sun May 22 23:11:04 2011
@@ -736,7 +736,7 @@ public class Registries implements Schem
             // Not allowed.
             String msg = I18n.err( I18n.ERR_04292, schemaObject.getName(), ne.getLocalizedMessage() );
 
-            Throwable error = new LdapProtocolErrorException( msg );
+            Throwable error = new LdapProtocolErrorException( msg, ne );
             errors.add( error );
             LOG.info( msg );
         }
@@ -757,7 +757,7 @@ public class Registries implements Schem
             // Not allowed.
             String msg = I18n.err( I18n.ERR_04293, schemaObject.getName(), ne.getLocalizedMessage() );
 
-            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
+            Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg, ne );
             errors.add( error );
             LOG.info( msg );
         }
@@ -1011,7 +1011,7 @@ public class Registries implements Schem
             {
                 // This MR's syntax has not been loaded into the Registries.
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                    LdapSchemaExceptionCodes.OID_ALREADY_REGISTERED, I18n.err( I18n.ERR_04294, matchingRule.getOid() ) );
+                    LdapSchemaExceptionCodes.OID_ALREADY_REGISTERED, I18n.err( I18n.ERR_04294, matchingRule.getOid() ), ne );
                 ldapSchemaException.setSourceObject( matchingRule );
                 errors.add( ldapSchemaException );
             }
@@ -1287,7 +1287,7 @@ public class Registries implements Schem
                 if ( !processed.contains( superiorOid ) )
                 {
                     LdapSchemaException ldapSchemaException = new LdapSchemaException(
-                        LdapSchemaExceptionCodes.OC_NONEXISTENT_SUPERIOR );
+                        LdapSchemaExceptionCodes.OC_NONEXISTENT_SUPERIOR, ne );
                     ldapSchemaException.setSourceObject( objectClass );
                     ldapSchemaException.setRelatedId( superiorOid );
                     errors.add( ldapSchemaException );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/url/LdapUrl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/url/LdapUrl.java?rev=1126274&r1=1126273&r2=1126274&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/url/LdapUrl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/url/LdapUrl.java Sun May 22 23:11:04 2011
@@ -647,7 +647,7 @@ public class LdapUrl
         }
         catch ( UrlDecoderException e )
         {
-            throw new LdapUriException( e.getMessage() );
+            throw new LdapUriException( e.getMessage(), e );
         }
     }
 



Mime
View raw message