try {
wadiManager.contextualise(invocation);
} catch (InvocationException e) {
Throwable throwable = e.getCause();
if (throwable instanceof IOException) {
throw new ClusteredInvocationException(throwable);
} else if (throwable instanceof ServletException) {
throw new ClusteredInvocationException(throwable);
} else {
throw new ClusteredInvocationException(e);
}
}
}