Skip to content

Commit

Permalink
Throw exceptions on client
Browse files Browse the repository at this point in the history
  • Loading branch information
danielBCN committed May 30, 2018
1 parent 22f9a63 commit 6fb5a3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public final Object getProxy(){
public abstract void doExecute(Call call);

protected Object execute(Call call)
throws InterruptedException, ExecutionException, java.util.concurrent.TimeoutException {
throws Throwable {

if (log.isTraceEnabled())
log.trace(this + " Executing "+call);
Expand All @@ -72,8 +72,8 @@ protected Object execute(Call call)
attempts++;
doExecute(call);
ret = future.get(TTIMEOUT_TIME, TimeUnit.MILLISECONDS);
if (ret instanceof Throwable)
throw new ExecutionException((Throwable) ret);
// if (ret instanceof Throwable)
// throw new ExecutionException((Throwable) ret);
}catch (TimeoutException e) {
if (!future.isDone())
log.warn(" Failed "+ call + " ("+e.getMessage()+")");
Expand All @@ -83,6 +83,8 @@ protected Object execute(Call call)
}
Thread.sleep(TTIMEOUT_TIME);
}
if (ret instanceof Throwable)

}

registeredCalls.remove(call.getCallID());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public String toString() {
// internals

private synchronized void open()
throws InterruptedException, ExecutionException, java.util.concurrent.TimeoutException {
throws Throwable {

if (!isOpen) {

Expand Down

0 comments on commit 6fb5a3b

Please sign in to comment.