Browse Source

Change runtime exception by error code.

JNI-88
Hussein Kasem 7 years ago
parent
commit
9a5775f402
  1. 6
      src/org/pEp/jniadapter/AbstractEngine.java

6
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;
}

Loading…
Cancel
Save