| | |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools; |
| | | import org.opends.messages.Message; |
| | | |
| | | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines an exception that may be thrown during the course of |
| | | * creating an LDAP connection to the server. |
| | | */ |
| | | public class LDAPConnectionException extends Exception |
| | | { |
| | | public class LDAPConnectionException extends OpenDsException { |
| | | |
| | | /** |
| | | * The serial version identifier required to satisfy the compiler because this |
| | | * class extends <CODE>java.lang.Exception</CODE>, which implements the |
| | |
| | | /** |
| | | * The server-provided error message for this exception. |
| | | */ |
| | | private final String errorMessage; |
| | | private final Message errorMessage; |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * @param message The message to use for this exception. |
| | | */ |
| | | public LDAPConnectionException(String message) |
| | | public LDAPConnectionException(Message message) |
| | | { |
| | | super(message); |
| | | |
| | |
| | | * @param resultCode The result code for this exception. |
| | | * @param errorMessage The server-provided error message for this exception. |
| | | */ |
| | | public LDAPConnectionException(String message, int resultCode, |
| | | String errorMessage) |
| | | public LDAPConnectionException(Message message, int resultCode, |
| | | Message errorMessage) |
| | | { |
| | | super(message); |
| | | |
| | |
| | | * @param cause The underlying cause that triggered this |
| | | * exception. |
| | | */ |
| | | public LDAPConnectionException(String message, Throwable cause) |
| | | public LDAPConnectionException(Message message, Throwable cause) |
| | | { |
| | | super(message, cause); |
| | | |
| | |
| | | * @param cause The underlying cause that triggered this |
| | | * exception. |
| | | */ |
| | | public LDAPConnectionException(String message, int resultCode, |
| | | String errorMessage, Throwable cause) |
| | | public LDAPConnectionException(Message message, int resultCode, |
| | | Message errorMessage, Throwable cause) |
| | | { |
| | | super(message, cause); |
| | | |
| | |
| | | * @param cause The underlying cause that triggered this |
| | | * exception. |
| | | */ |
| | | public LDAPConnectionException(String message, int resultCode, |
| | | String errorMessage, DN matchedDN, |
| | | public LDAPConnectionException(Message message, int resultCode, |
| | | Message errorMessage, DN matchedDN, |
| | | Throwable cause) |
| | | { |
| | | super(message, cause); |
| | |
| | | * |
| | | * @return The server-provided error message associated with this exception. |
| | | */ |
| | | public String getErrorMessage() |
| | | public Message getErrorMessage() |
| | | { |
| | | return this.errorMessage; |
| | | } |