/** * Rethrows an exception to record the full stack trace, both caller * and callee. */ @Override public ServiceExceptionIllegalArgument rethrow(String msg) { return new ServiceExceptionIllegalArgument(msg, this); } }
static void requireService(Object listener) { if (listener instanceof ServiceRefAmp) { } else if (listener instanceof ProxyHandleAmp) { } else { throw new ServiceExceptionIllegalArgument(String.valueOf(listener)); } }
result.fail(e); } catch (IllegalArgumentException e) { RuntimeException exn = new ServiceExceptionIllegalArgument(bean + "." + _name + ": " + e.getMessage(), e); exn.fillInStackTrace(); RuntimeException exn = new ServiceExceptionIllegalArgument(bean.getClass().getSimpleName() + "." + _name + ": " + e.getMessage(), e); exn.fillInStackTrace(); RuntimeException exn = new ServiceExceptionIllegalArgument(msg, e);
methodHandle().invoke(bean, result, args); } catch (IllegalArgumentException e) { RuntimeException exn = new ServiceExceptionIllegalArgument(bean + "." + name() + ": " + e.getMessage(), e); exn.fillInStackTrace(); RuntimeException exn = new ServiceExceptionIllegalArgument(msg, e);
methodHandle().invoke(bean, result, args); } catch (IllegalArgumentException e) { RuntimeException exn = new ServiceExceptionIllegalArgument(bean + "." + name() + ": " + e.getMessage(), e); exn.fillInStackTrace(); RuntimeException exn = new ServiceExceptionIllegalArgument(msg, e);
RuntimeException exn = new ServiceExceptionIllegalArgument(msg, e); RuntimeException exn = new ServiceExceptionIllegalArgument(msg, e); RuntimeException exn = new ServiceExceptionIllegalArgument(msg, e);
RuntimeException exn = new ServiceExceptionIllegalArgument(bean + "." + name() + ": " + e.getMessage(), e); exn.fillInStackTrace(); RuntimeException exn = new ServiceExceptionIllegalArgument(msg, e);
@Override public void query(HeadersAmp headers, ResultChain<?> result, StubAmp stub, Object []args) { try { Object bean = stub.bean(); if (log.isLoggable(Level.FINEST)) { log.finest("amp-query " + name() + "[" + bean + "] " + toList(args) + "\n " + result); } Object value = _methodHandle.invokeExact(bean, args); ((Result) result).ok(value); } catch (ArrayIndexOutOfBoundsException | IllegalArgumentException e) { if (args.length != parameters().length) { throw new ServiceExceptionIllegalArgument(L.l("{0}.{1} called with invalid argument length ({2}).", stub.bean().getClass().getSimpleName(), name(), args.length)); } result.fail(e); } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); result.fail(e); } }
ServiceException exn = new ServiceExceptionIllegalArgument();
throw new ServiceExceptionIllegalArgument(L.l("ServiceRef arg is only allowed for session:, in service '{0}' and method '{1}'", address, method));