| | |
| | | import org.opends.server.types.*; |
| | | |
| | | 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.ToolMessages.*; |
| | | import static org.opends.server.protocols.ldap.LDAPConstants.*; |
| | |
| | | public class LDAPSearch |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = "org.opends.server.tools.LDAPSearch"; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | throw new IOException(ae.getMessage()); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | err.println(wrapText(le.getMessage(), MAX_LINE_WIDTH)); |
| | | return 1; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH)); |
| | | return 1; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH)); |
| | | return 1; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ex); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | err.println(wrapText(ex.getMessage(), MAX_LINE_WIDTH)); |
| | | return 1; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH)); |
| | | return 1; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | LDAPToolUtils.printErrorMessage(err, le.getMessage(), le.getResultCode(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, lce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, lce); |
| | | } |
| | | LDAPToolUtils.printErrorMessage(err, lce.getMessage(), |
| | | lce.getResultCode(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH)); |
| | | return 1; |