directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r542351 - /directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ChangePasswordException.java
Date Mon, 28 May 2007 22:25:42 GMT
Author: erodriguez
Date: Mon May 28 15:25:39 2007
New Revision: 542351

URL: http://svn.apache.org/viewvc?view=rev&rev=542351
Log:
Clean-up of ChangePasswordException to better support nested exceptions.

Modified:
    directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ChangePasswordException.java

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ChangePasswordException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ChangePasswordException.java?view=diff&rev=542351&r1=542350&r2=542351
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ChangePasswordException.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ChangePasswordException.java
Mon May 28 15:25:39 2007
@@ -35,56 +35,53 @@
     private static final long serialVersionUID = 4880242751298831543L;
 
 
-    // ------------------------------------------------------------------------
-    // C O N S T R U C T O R S
-    // ------------------------------------------------------------------------
-
     /**
-     * Creates a ChangePasswordException with an error code and a message.
+     * Creates a ChangePasswordException with an {@link ErrorType}.
      *
-     * @param errorCode the error code associated with this ChangePasswordException
-     * @param msg the standard Change Password error message for this ChangePasswordException
+     * @param errorType The {@link ErrorType} associated with this ChangePasswordException.
      */
-    public ChangePasswordException(int errorCode, String msg)
+    public ChangePasswordException( ErrorType errorType )
     {
-        super( errorCode, msg );
+        super( errorType.getOrdinal(), errorType.getMessage() );
     }
 
 
     /**
-     * Creates a ChangePasswordException with an error code, a message and an
+     * Creates a ChangePasswordException with an {@link ErrorType} and an
      * underlying throwable that caused this fault.
      *
-     * @param errorCode the error code associated with this ChangePasswordException
-     * @param msg the standard Change Password error message for this ChangePasswordException
-     * @param cause the underlying failure, if any
+     * @param errorType The {@link ErrorType} associated with this ChangePasswordException.
+     * @param cause The underlying failure, if any.
      */
-    public ChangePasswordException(int errorCode, String msg, Throwable cause)
+    public ChangePasswordException( ErrorType errorType, Throwable cause )
     {
-        super( errorCode, msg, cause );
+        super( errorType.getOrdinal(), errorType.getMessage(), cause );
     }
 
 
     /**
-     * Creates a ChangePasswordException with an error code and a message.
+     * Creates a ChangePasswordException with an {@link ErrorType} and
+     * data helping to explain what caused this fault.
      *
-     * @param errorType the error type associated with this ChangePasswordException
+     * @param errorType The {@link ErrorType} associated with this ChangePasswordException.
+     * @param explanatoryData Data helping to explain this fault, if any.
      */
-    public ChangePasswordException(ErrorType errorType)
+    public ChangePasswordException( ErrorType errorType, byte[] explanatoryData )
     {
-        super( errorType.getOrdinal(), errorType.getMessage() );
+        super( errorType.getOrdinal(), errorType.getMessage(), explanatoryData );
     }
 
 
     /**
-     * Creates a ChangePasswordException with an error code, a message, and
-     * data helping to explain what caused this fault.
+     * Creates a ChangePasswordException with an {@link ErrorType}, data helping to explain
+     * what caused this fault, and an underlying throwable that caused this fault.
      *
-     * @param errorType the error type associated with this ChangePasswordException
-     * @param explanatoryData data helping to explain this fault, if any
+     * @param errorType The error type associated with this ChangePasswordException.
+     * @param explanatoryData Data helping to explain this fault, if any.
+     * @param cause The underlying failure, if any.
      */
-    public ChangePasswordException(ErrorType errorType, byte[] explanatoryData)
+    public ChangePasswordException( ErrorType errorType, byte[] explanatoryData, Throwable
cause )
     {
-        super( errorType.getOrdinal(), errorType.getMessage(), explanatoryData );
+        super( errorType.getOrdinal(), errorType.getMessage(), explanatoryData, cause );
     }
 }



Mime
View raw message