Example #1
0
 private synchronized T get(T msg) throws ExecutionException {
   if (msg.getReturnCode() != 0) {
     Exception e;
     Object o = msg.getErrorObject();
     if (o instanceof Exception) {
       e = (Exception) o;
     } else {
       e = CacheExceptionFactory.exceptionOf(msg.getReturnCode(), String.valueOf(o));
     }
     throw new ExecutionException(e.getMessage(), e);
   }
   return msg;
 }
 public void failed(int rc, String msg) {
   failed(CacheExceptionFactory.exceptionOf(rc, msg));
 }