directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r433691 - /directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ResponseCarryingException.java
Date Tue, 22 Aug 2006 17:02:52 GMT
Author: elecharny
Date: Tue Aug 22 10:02:52 2006
New Revision: 433691

URL: http://svn.apache.org/viewvc?rev=433691&view=rev
Log:
Added an exception which will hold the Response when we get an exception
in one of the grammars (invalid DN for instance)

Added:
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ResponseCarryingException.java

Added: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ResponseCarryingException.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ResponseCarryingException.java?rev=433691&view=auto
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ResponseCarryingException.java
(added)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ResponseCarryingException.java
Tue Aug 22 10:02:52 2006
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.directory.shared.ldap.codec;
+
+import org.apache.directory.shared.asn1.codec.DecoderException;
+
+
+/**
+ * Thrown when a Decoder has encountered a failure condition during a decode.
+ * 
+ * @author Apache Software Foundation
+ * @version $Id: DecoderException.java 379008 2006-02-20 03:35:07Z akarasulu $
+ */
+public class ResponseCarryingException extends DecoderException
+{
+    /**
+     * Declares the Serial Version Uid.
+     * 
+     * @see <a
+     *      href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always
+     *      Declare Serial Version Uid</a>
+     */
+    private static final long serialVersionUID = 1L;
+
+    /** The response with the error cause */
+    private LdapMessage response;
+    
+    /**
+     * Creates a DecoderException
+     * 
+     * @param message
+     *            A message with meaning to a human
+     */
+    public ResponseCarryingException(String message)
+    {
+        super( message );
+    }
+
+
+    /**
+     * Creates a DecoderException
+     * 
+     * @param message
+     *            A message with meaning to a human
+     * @param cause
+     *            The Exception which caused the error
+     */
+    public ResponseCarryingException(String message, Throwable cause)
+    {
+        super( message, cause );
+    }
+    
+    /**
+     * Set a response if we get an exception while parsing the message
+     * @param response the constructed response
+     */
+    public void setResponse( LdapMessage response ) 
+    {
+        this.response = response;
+    }
+    
+    /**
+     * Get the constructed response
+     * @return The constructed response
+     */
+    public LdapMessage getResponse()
+    {
+        return response;
+    }
+
+}



Mime
View raw message