Closed wsky closed 11 years ago
in DynamicProxy.java
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { MethodCall methodCall = new MethodCall(); methodCall.Uri = this.uriString; methodCall.MethodName = method.getName(); methodCall.TypeName = method.getDeclaringClass().getName(); // do not support method overloaded currently methodCall.MethodSignature = null; methodCall.Args = args; MethodReturn methodReturn = this.invoke(methodCall); if (methodReturn.Exception == null) return methodReturn.ReturnValue; //will course java.lang.reflect.UndeclaredThrowableException //throw new RemotingException("invoke got error", methodReturn.Exception); throw methodReturn.Exception; }
http://stackoverflow.com/questions/5490139/getting-undeclaredthrowableexception-instead-of-my-own-exception
throw methodReturn.Exception;
still got UndeclaredThrowableException while having inner exception from remote
interface not declear custom exception, then throw, the error got
http://amitstechblog.wordpress.com/2011/07/24/java-proxies-and-undeclaredthrowableexception/
in DynamicProxy.java