directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1681674 [2/2] - in /directory/shared/trunk: asn1/api/src/main/java/org/apache/directory/api/asn1/util/ dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/ dsml/parse...
Date Tue, 26 May 2015 02:51:46 GMT
Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java
Tue May 26 02:51:46 2015
@@ -92,11 +92,11 @@ public final class GracefulDisconnectGra
                     container.getGracefulDisconnectResponse().setDelay( delay );
                     container.setGrammarEndAllowed( true );
                 }
-                catch ( IntegerDecoderException e )
+                catch ( IntegerDecoderException ide )
                 {
                     String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes( value.getData()
) );
                     LOG.error( msg );
-                    throw new DecoderException( msg );
+                    throw new DecoderException( msg, ide );
                 }
             }
         };
@@ -131,11 +131,11 @@ public final class GracefulDisconnectGra
                         LOG.debug( "Stores a referral : {}", ldapUrl );
                     }
                 }
-                catch ( LdapURLEncodingException e )
+                catch ( LdapURLEncodingException luee )
                 {
                     String msg = "failed to decode the URL '" + Strings.dumpBytes( value.getData()
) + "'";
                     LOG.error( msg );
-                    throw new DecoderException( msg );
+                    throw new DecoderException( msg, luee );
                 }
             }
         };
@@ -162,11 +162,11 @@ public final class GracefulDisconnectGra
                     container.getGracefulDisconnectResponse().setTimeOffline( timeOffline
);
                     container.setGrammarEndAllowed( true );
                 }
-                catch ( IntegerDecoderException e )
+                catch ( IntegerDecoderException ide )
                 {
                     String msg = I18n.err( I18n.ERR_04037, Strings.dumpBytes( value.getData()
) );
                     LOG.error( msg );
-                    throw new DecoderException( msg );
+                    throw new DecoderException( msg, ide );
                 }
             }
         };

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java
Tue May 26 02:51:46 2015
@@ -132,11 +132,11 @@ public final class GracefulShutdownGramm
                             container.getGracefulShutdownRequest().setTimeOffline( timeOffline
);
                             container.setGrammarEndAllowed( true );
                         }
-                        catch ( IntegerDecoderException e )
+                        catch ( IntegerDecoderException ide )
                         {
                             String msg = I18n.err( I18n.ERR_04037, Strings.dumpBytes( value.getData()
) );
                             LOG.error( msg );
-                            throw new DecoderException( msg );
+                            throw new DecoderException( msg, ide );
                         }
                     }
                 } );
@@ -174,11 +174,11 @@ public final class GracefulShutdownGramm
                             container.getGracefulShutdownRequest().setDelay( delay );
                             container.setGrammarEndAllowed( true );
                         }
-                        catch ( IntegerDecoderException e )
+                        catch ( IntegerDecoderException ide )
                         {
                             String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes( value.getData()
) );
                             LOG.error( msg );
-                            throw new DecoderException( msg );
+                            throw new DecoderException( msg, ide );
                         }
                     }
                 } );
@@ -218,11 +218,11 @@ public final class GracefulShutdownGramm
                             gracefulShutdownContainer.getGracefulShutdownRequest().setDelay(
delay );
                             gracefulShutdownContainer.setGrammarEndAllowed( true );
                         }
-                        catch ( IntegerDecoderException e )
+                        catch ( IntegerDecoderException ide )
                         {
                             String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes( value.getData()
) );
                             LOG.error( msg );
-                            throw new DecoderException( msg );
+                            throw new DecoderException( msg, ide );
                         }
                     }
                 } );

Modified: directory/shared/trunk/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java
(original)
+++ directory/shared/trunk/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java
Tue May 26 02:51:46 2015
@@ -199,7 +199,7 @@ public class DnNode<N> implements Clonea
         catch ( LdapException le )
         {
             // Special cas e: the Dn is empty, this is not allowed
-            throw new IllegalArgumentException( le.getMessage() );
+            throw new IllegalArgumentException( le.getMessage(), le );
         }
     }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java
Tue May 26 02:51:46 2015
@@ -175,7 +175,7 @@ public class Csn implements Comparable<C
             {
                 String message = I18n.err( I18n.ERR_04118, timestampStr );
                 LOG.error( message );
-                throw new InvalidCSNException( message );
+                throw new InvalidCSNException( message, pe );
             }
         }
 
@@ -190,7 +190,7 @@ public class Csn implements Comparable<C
         {
             String message = I18n.err( I18n.ERR_04119 );
             LOG.error( message );
-            throw new InvalidCSNException( message );
+            throw new InvalidCSNException( message, nfe );
         }
 
         tempTimestamp += ( millis / 1000 );
@@ -216,7 +216,7 @@ public class Csn implements Comparable<C
         {
             String message = I18n.err( I18n.ERR_04121, changeCountStr );
             LOG.error( message );
-            throw new InvalidCSNException( message );
+            throw new InvalidCSNException( message, nfe );
         }
 
         // Get the replicaID
@@ -246,7 +246,7 @@ public class Csn implements Comparable<C
         {
             String message = I18n.err( I18n.ERR_04124, replicaIdStr );
             LOG.error( message );
-            throw new InvalidCSNException( message );
+            throw new InvalidCSNException( message, nfe );
         }
 
         // Get the modification number
@@ -267,7 +267,7 @@ public class Csn implements Comparable<C
         {
             String message = I18n.err( I18n.ERR_04126, operationNumberStr );
             LOG.error( message );
-            throw new InvalidCSNException( message );
+            throw new InvalidCSNException( message, nfe );
         }
 
         csnStr = value;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
Tue May 26 02:51:46 2015
@@ -1435,7 +1435,7 @@ public final class DefaultEntry implemen
             {
                 String message = I18n.err( I18n.ERR_04464, upId, ne.getLocalizedMessage()
);
                 LOG.error( message );
-                throw new IllegalArgumentException( message );
+                throw new IllegalArgumentException( message, ne );
             }
         }
     }
@@ -1474,7 +1474,7 @@ public final class DefaultEntry implemen
             {
                 String message = I18n.err( I18n.ERR_04464, upId, ne.getLocalizedMessage()
);
                 LOG.error( message );
-                throw new IllegalArgumentException( message );
+                throw new IllegalArgumentException( message, ne );
             }
         }
     }
@@ -1513,7 +1513,7 @@ public final class DefaultEntry implemen
             {
                 String message = I18n.err( I18n.ERR_04464, upId, ne.getLocalizedMessage()
);
                 LOG.error( message );
-                throw new IllegalArgumentException( message );
+                throw new IllegalArgumentException( message, ne );
             }
         }
     }
@@ -1654,7 +1654,7 @@ public final class DefaultEntry implemen
             {
                 String message = I18n.err( I18n.ERR_04477_NO_VALID_AT_FOR_THIS_ID );
                 LOG.error( message );
-                throw new IllegalArgumentException( message );
+                throw new IllegalArgumentException( message, e );
             }
         }
         else
@@ -1704,7 +1704,7 @@ public final class DefaultEntry implemen
             {
                 String message = I18n.err( I18n.ERR_04477_NO_VALID_AT_FOR_THIS_ID );
                 LOG.error( message );
-                throw new IllegalArgumentException( message );
+                throw new IllegalArgumentException( message, e );
             }
         }
         else
@@ -1747,7 +1747,7 @@ public final class DefaultEntry implemen
             {
                 String message = I18n.err( I18n.ERR_04477_NO_VALID_AT_FOR_THIS_ID );
                 LOG.error( message );
-                throw new IllegalArgumentException( message );
+                throw new IllegalArgumentException( message, e );
             }
         }
         else
@@ -2415,7 +2415,7 @@ public final class DefaultEntry implemen
                 {
                     String message = le.getLocalizedMessage();
                     LOG.error( message );
-                    throw new IOException( message );
+                    throw new IOException( message, le );
                 }
             }
             else

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/ResponseCarryingMessageException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/ResponseCarryingMessageException.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/ResponseCarryingMessageException.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/exception/ResponseCarryingMessageException.java
Tue May 26 02:51:46 2015
@@ -55,10 +55,20 @@ public class ResponseCarryingMessageExce
 
 
     /**
+     * Constructs an Exception without a message.
+     *
+     * @param cause The original cause
+     */
+    public ResponseCarryingMessageException( Throwable cause )
+    {
+        super( "", cause );
+    }
+
+
+    /**
      * Constructs an Exception with a detailed message.
      * 
-     * @param message
-     *            The message associated with the exception.
+     * @param message The message associated with the exception.
      */
     public ResponseCarryingMessageException( String message )
     {
@@ -66,6 +76,18 @@ public class ResponseCarryingMessageExce
     }
 
 
+    /**
+     * Constructs an Exception with a detailed message.
+     * 
+     * @param message The message associated with the exception.
+     * @param cause The original cause
+     */
+    public ResponseCarryingMessageException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+
     /**
      * Set a response if we get an exception while parsing the message
      * @param response the constructed response

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Ava.java
Tue May 26 02:51:46 2015
@@ -603,7 +603,7 @@ public class Ava implements Externalizab
         }
         catch ( CloneNotSupportedException cnse )
         {
-            throw new Error( "Assertion failure" );
+            throw new Error( "Assertion failure", cnse );
         }
     }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
Tue May 26 02:51:46 2015
@@ -884,7 +884,7 @@ public class Rdn implements Cloneable, E
         }
         catch ( CloneNotSupportedException cnse )
         {
-            throw new Error( "Assertion failure" );
+            throw new Error( "Assertion failure", cnse );
         }
     }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/GeneralizedTimeComparator.java
Tue May 26 02:51:46 2015
@@ -90,14 +90,15 @@ public class GeneralizedTimeComparator e
         }
         catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue )
);
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue ),
ioe );
         }
         catch ( ParseException pe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue )
);
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue ),
pe );
         }
 
         GeneralizedTime assertTime;
+        
         try
         {
             String prepared = PrepareString.normalize( assertValue, PrepareString.StringType.DIRECTORY_STRING
);
@@ -105,11 +106,11 @@ public class GeneralizedTimeComparator e
         }
         catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ),
ioe );
         }
         catch ( ParseException pe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ),
pe );
         }
 
         return backendTime.compareTo( assertTime );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java
Tue May 26 02:51:46 2015
@@ -131,17 +131,17 @@ public class IntegerComparator extends L
         {
             backendValue = PrepareString.normalize( backendValue, PrepareString.StringType.NUMERIC_STRING
);
         }
-        catch ( IOException e )
+        catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue )
);
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue )
, ioe);
         }
         try
         {
             assertValue = PrepareString.normalize( assertValue, PrepareString.StringType.NUMERIC_STRING
);
         }
-        catch ( IOException e )
+        catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ),
ioe );
         }
 
         BigInteger b1 = new BigInteger( backendValue );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java
Tue May 26 02:51:46 2015
@@ -84,17 +84,17 @@ public class NumericStringComparator ext
         {
             backendValue = PrepareString.normalize( backendValue, PrepareString.StringType.NUMERIC_STRING
);
         }
-        catch ( IOException e )
+        catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue )
);
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue ),
ioe );
         }
         try
         {
             assertValue = PrepareString.normalize( assertValue, PrepareString.StringType.NUMERIC_STRING
);
         }
-        catch ( IOException e )
+        catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ) ,
ioe);
         }
 
         return backendValue.compareTo( assertValue );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/SerializableComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/SerializableComparator.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/SerializableComparator.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/SerializableComparator.java
Tue May 26 02:51:46 2015
@@ -77,9 +77,9 @@ public class SerializableComparator<E> e
             {
                 wrapped = ( Comparator<E> ) schemaManager.lookupComparatorRegistry(
matchingRuleOid );
             }
-            catch ( LdapException e )
+            catch ( LdapException le )
             {
-                throw new RuntimeException( I18n.err( I18n.ERR_04221, matchingRuleOid ) );
+                throw new RuntimeException( I18n.err( I18n.ERR_04221, matchingRuleOid ),
le );
             }
         }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java
Tue May 26 02:51:46 2015
@@ -286,16 +286,16 @@ public class OpenLdapSchemaParser extend
             afterParse();
             monitor.finishedParse( "Done parsing!" );
         }
-        catch ( RecognitionException e )
+        catch ( RecognitionException re )
         {
             String msg = "Parser failure on:\n\t" + subject;
-            msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( e );
-            throw new ParseException( msg, e.getColumn() );
+            msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( re );
+            throw new ParseException( msg, re.getColumn() );
         }
-        catch ( TokenStreamException e2 )
+        catch ( TokenStreamException tse )
         {
             String msg = "Parser failure on:\n\t" + subject;
-            msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( e2 );
+            msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( tse );
             throw new ParseException( msg, 0 );
         }
     }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/SubtreeSpecificationChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/SubtreeSpecificationChecker.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/SubtreeSpecificationChecker.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/SubtreeSpecificationChecker.java
Tue May 26 02:51:46 2015
@@ -116,5 +116,4 @@ public class SubtreeSpecificationChecker
             throw new ParseException( msg, 0 );
         }
     }
-
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
Tue May 26 02:51:46 2015
@@ -342,7 +342,7 @@ public class LdapUrl
         }
         catch ( UnsupportedEncodingException uee )
         {
-            throw new LdapURLEncodingException( I18n.err( I18n.ERR_04409, string ) );
+            throw new LdapURLEncodingException( I18n.err( I18n.ERR_04409, string ) , uee
);
         }
     }
 
@@ -881,9 +881,9 @@ public class LdapUrl
         {
             return data.getBytes( "US-ASCII" );
         }
-        catch ( UnsupportedEncodingException e )
+        catch ( UnsupportedEncodingException uee )
         {
-            throw new UrlDecoderException( I18n.err( I18n.ERR_04413 ) );
+            throw new UrlDecoderException( I18n.err( I18n.ERR_04413 ), uee );
         }
     }
 
@@ -924,9 +924,9 @@ public class LdapUrl
 
                     buffer.write( ( char ) ( ( u << 4 ) + l ) );
                 }
-                catch ( ArrayIndexOutOfBoundsException e )
+                catch ( ArrayIndexOutOfBoundsException aioobe )
                 {
-                    throw new UrlDecoderException( I18n.err( I18n.ERR_04414 ) );
+                    throw new UrlDecoderException( I18n.err( I18n.ERR_04414 ) , aioobe );
                 }
             }
             else

Modified: directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
(original)
+++ directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
Tue May 26 02:51:46 2015
@@ -164,7 +164,7 @@ public class LdapProtocolDecoder impleme
                 messageContainer.clean();
                 
                 // Transform the DecoderException message to a MessageException
-                ResponseCarryingMessageException rcme = new ResponseCarryingMessageException(
rce.getMessage() );
+                ResponseCarryingMessageException rcme = new ResponseCarryingMessageException(
rce.getMessage(), rce );
                 rcme.setResponse( ( ( ResponseCarryingException ) rce ).getResponse() );
 
                 throw rcme;
@@ -175,7 +175,7 @@ public class LdapProtocolDecoder impleme
                 messageContainer.clean();
 
                 // TODO : This is certainly not the way we should handle such an exception
!
-                throw new ResponseCarryingException( de.getMessage() );
+                throw new ResponseCarryingException( de.getMessage(), de );
             }
         }
     }

Modified: directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java
(original)
+++ directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java
Tue May 26 02:51:46 2015
@@ -205,7 +205,7 @@ public class DefaultSchemaManager implem
         }
         catch ( CloneNotSupportedException cnse )
         {
-            throw new LdapOtherException( cnse.getMessage() );
+            throw new LdapOtherException( cnse.getMessage(), cnse );
         }
     }
 
@@ -259,7 +259,7 @@ public class DefaultSchemaManager implem
         }
         catch ( IOException ioe )
         {
-            throw new LdapOtherException( ioe.getMessage() );
+            throw new LdapOtherException( ioe.getMessage(), ioe );
         }
     }
 
@@ -1854,7 +1854,7 @@ public class DefaultSchemaManager implem
                 }
                 catch ( CloneNotSupportedException cnse )
                 {
-                    throw new LdapOtherException( cnse.getMessage() );
+                    throw new LdapOtherException( cnse.getMessage() , cnse);
                 }
 
                 // Inject the new SchemaObject in the cloned registries
@@ -1967,7 +1967,7 @@ public class DefaultSchemaManager implem
                 }
                 catch ( CloneNotSupportedException cnse )
                 {
-                    throw new LdapOtherException( cnse.getMessage() );
+                    throw new LdapOtherException( cnse.getMessage(), cnse );
                 }
 
                 // Delete the SchemaObject from the cloned registries

Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/MandatoryAndOptionalComponentsMonitor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/MandatoryAndOptionalComponentsMonitor.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/MandatoryAndOptionalComponentsMonitor.java
(original)
+++ directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/MandatoryAndOptionalComponentsMonitor.java
Tue May 26 02:51:46 2015
@@ -88,7 +88,7 @@ public class MandatoryAndOptionalCompone
             }
             catch ( IllegalArgumentException e2 )
             {
-                throw new IllegalArgumentException( I18n.err( I18n.ERR_04416, component )
);
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_04416, component ),
e1 );
             }
         }
 

Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/Strings.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/Strings.java?rev=1681674&r1=1681673&r2=1681674&view=diff
==============================================================================
--- directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/Strings.java (original)
+++ directory/shared/trunk/util/src/main/java/org/apache/directory/api/util/Strings.java Tue
May 26 02:51:46 2015
@@ -743,7 +743,7 @@ public final class Strings
             catch ( UnsupportedEncodingException uee )
             {
                 // if this happens something is really strange
-                throw new RuntimeException( uee );
+                throw new RuntimeException( uee.getMessage(), uee );
             }
         }
 



Mime
View raw message