@Override final public String getLocalizedMessage () { return this.getMessage(); }
@Override public Response serviceRequest(Command cmd, byte[]... args) throws RedisException, ClientRuntimeException, ProviderException { throw new ClientRuntimeException (errorMsg); }
@Override final public String getMessage () { StringBuffer buff = new StringBuffer(); String message = super.getMessage(); if(null == message) buff.append("[BUG: null message]"); else buff.append(message); Throwable cause = getCause(); if(null != cause) buff.append(" cause: => [").append(cause.getClass().getSimpleName()).append(": ").append(cause.getMessage()).append("]"); return buff.toString(); } }
Log.problem ("ClientRuntimeException: " + cre.getMessage()); onResponseHandlerError(cre, pending); break; onResponseHandlerError(new ClientRuntimeException("Unexpected (and not handled) RuntimeException", e), pending); break;
final private Connection createAsyncConnection() { Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); conn = new FaultedConnection(connSpec, msg); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
Log.problem ("serviceRequest() -- ClientRuntimeException => " + cre.getLocalizedMessage()); reconnect(); throw new ConnectionReset ("Connection re-established but last request not processed: " + cre.getLocalizedMessage()); disconnect(); throw new ClientRuntimeException("unexpected runtime exeption: " + e.getLocalizedMessage(), e);
Log.error ("ClientRuntimeException: " + cre.getLocalizedMessage()); cre.printStackTrace(); pending.setCRE(cre);
Log.problem ("ClientRuntimeException: " + cre.getMessage()); onResponseHandlerError(cre, pending); break; onResponseHandlerError(new ClientRuntimeException("Unexpected (and not handled) RuntimeException", e), pending); break;
final private Connection createAsyncConnection() { Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); conn = new FaultedConnection(connSpec, msg); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
Log.problem ("serviceRequest() -- ClientRuntimeException => " + cre.getLocalizedMessage()); reconnect(); throw new ConnectionReset ("Connection re-established but last request not processed: " + cre.getLocalizedMessage()); disconnect(); throw new ClientRuntimeException("unexpected runtime exeption: " + e.getLocalizedMessage(), e);
Log.error ("ClientRuntimeException: " + cre.getLocalizedMessage()); cre.printStackTrace(); pending.setCRE(cre);
@Override public Future<Response> queueRequest(Command cmd, byte[]... args) throws ClientRuntimeException, ProviderException { throw new ClientRuntimeException (errorMsg); } /* (non-Javadoc) @see org.jredis.connector.Connection#addListener(org.jredis.connector.Connection.Listener) */
Log.problem ("ClientRuntimeException: " + cre.getMessage()); onResponseHandlerError(cre, pending); break; onResponseHandlerError(new ClientRuntimeException("Unexpected (and not handled) RuntimeException", e), pending); break;
final private Connection createAsynchConnection() { Connection.Factory cfact = (Connection.Factory) connSpec.getConnectionProperty(Property.CONNECTION_FACTORY); Connection conn = null; try { conn = Assert.notNull(cfact.newConnection(connSpec), "connection delegate", ClientRuntimeException.class); } catch (ProviderException e) { Log.bug("Couldn't create the handler delegate. => " + e.getLocalizedMessage()); throw e; } catch (ClientRuntimeException e) { String msg = String.format("%s\nMake sure your server is running.", e.getMessage()); Log.error ("Error creating connection -> " + e.getLocalizedMessage()); conn = new FaultedConnection(connSpec, msg); } Log.debug ("%s: Using %s", this.getClass().getSimpleName(), conn); return conn; } // ------------------------------------------------------------------------
@Override final public String getLocalizedMessage () { return this.getMessage(); }
Log.problem ("serviceRequest() -- ClientRuntimeException => " + cre.getLocalizedMessage()); reconnect(); throw new ConnectionReset ("Connection re-established but last request not processed: " + cre.getLocalizedMessage()); disconnect(); throw new ClientRuntimeException("unexpected runtime exeption: " + e.getLocalizedMessage(), e);
Log.error ("ClientRuntimeException: " + cre.getLocalizedMessage()); cre.printStackTrace(); pending.setCRE(cre);
@Override final public String getMessage () { StringBuffer buff = new StringBuffer(); String message = super.getMessage(); if(null == message) buff.append("[BUG: null message]"); else buff.append(message); Throwable cause = getCause(); if(null != cause) buff.append(" cause: => [").append(cause.getClass().getSimpleName()).append(": ").append(cause.getMessage()).append("]"); return buff.toString(); } }
public Response serviceRequest(Command cmd, byte[]... args) throws RedisException, ClientRuntimeException, ProviderException { throw new ClientRuntimeException (errorMsg); }
Log.problem ("ClientRuntimeException: " + cre.getMessage()); onResponseHandlerError(cre, pending); break; onResponseHandlerError(new ClientRuntimeException("Unexpected (and not handled) RuntimeException", e), pending); break;