- return get();
- } catch (InterruptedException | ExecutionException e) {
- // FIXME: Add exception mapping
- throw new RuntimeException(e);
- }
- }
-
- @Override
- public DOMRpcResult checkedGet(final long timeout, final TimeUnit unit) throws TimeoutException, DOMRpcException {
- try {
- return get(timeout, unit);
- } catch (InterruptedException | ExecutionException e) {
- // FIXME: Add exception mapping
- throw new RuntimeException(e);
+ return transformIfNecessary(bindingFuture.get(timeout, unit));
+ } catch (ExecutionException e) {
+ throw new ExecutionException(e.getMessage(), DOM_RPC_EX_MAPPER.apply(e));