diff --git a/forge-gui/src/main/java/forge/net/GameProtocolHandler.java b/forge-gui/src/main/java/forge/net/GameProtocolHandler.java index 888d0dffeed..face68c68ac 100644 --- a/forge-gui/src/main/java/forge/net/GameProtocolHandler.java +++ b/forge-gui/src/main/java/forge/net/GameProtocolHandler.java @@ -56,7 +56,7 @@ public abstract class GameProtocolHandler extends ChannelInboundHandlerAdapte } catch (final IllegalAccessException | IllegalArgumentException e) { System.err.println(String.format("Unknown protocol method %s with %d args", methodName, args == null ? 0 : args.length)); } catch (final InvocationTargetException e) { - throw new RuntimeException(e); + throw new RuntimeException(e.getTargetException()); } } else { Serializable reply = null; @@ -71,7 +71,7 @@ public abstract class GameProtocolHandler extends ChannelInboundHandlerAdapte } catch (final IllegalAccessException | IllegalArgumentException e) { System.err.println(String.format("Unknown protocol method %s with %d args, replying with null", methodName, args == null ? 0 : args.length)); } catch (final InvocationTargetException e) { - throw new RuntimeException(e); + throw new RuntimeException(e.getTargetException()); } getRemote(ctx).send(new ReplyEvent(event.getId(), reply)); }