| | |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.CoreMessages. |
| | | MSGID_RESULT_CLIENT_SIDE_CONNECT_ERROR; |
| | |
| | | */ |
| | | public class LDAPConnection |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The hostname to connect to. |
| | | private String hostName = null; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ex); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | throw new LDAPConnectionException(ex.getMessage(), ex); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ex1); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex1); |
| | | } |
| | | throw new LDAPConnectionException(ex1.getMessage(), ex1); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ex2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex2); |
| | | } |
| | | throw new LDAPConnectionException(ex2.getMessage(), ex2); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | // It doesn't matter too much if this throws, so ignore it. |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | throw new LDAPConnectionException(ce.getMessage(), ce.getExitCode(), |
| | | null, ce); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ex); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | throw new LDAPConnectionException(ex.getMessage(), ex); |
| | | } |