diff --git a/src/org/pEp/jniadapter/AbstractEngine.java b/src/org/pEp/jniadapter/AbstractEngine.java index ceda89d..ef49c6d 100644 --- a/src/org/pEp/jniadapter/AbstractEngine.java +++ b/src/org/pEp/jniadapter/AbstractEngine.java @@ -156,7 +156,7 @@ abstract class AbstractEngine implements AutoCloseable { if (needsFastPollCallback != null) { needsFastPollCallback.needsFastPollCallFromC(fast_poll_needed); } else { - throw new RuntimeException("Callback not set"); + return -1; } return 0; } @@ -168,7 +168,7 @@ abstract class AbstractEngine implements AutoCloseable { if (notifyHandshakeCallback != null) { notifyHandshakeCallback.notifyHandshake(myself, partner, _signal); } else { - throw new RuntimeException("Callback not set"); + return -1; } return 0; } @@ -177,7 +177,7 @@ abstract class AbstractEngine implements AutoCloseable { if (messageToSendCallback != null) { messageToSendCallback.messageToSend(message); } else { - throw new RuntimeException("Callback not set"); + return -1; } return 0; }