public static int errorCodeFromException(Throwable ex) { if (ex instanceof RSocketException) { return ((RSocketException) ex).errorCode(); } return APPLICATION_ERROR; }
@DisplayName("errorCode returns specified value") @Test default void errorCodeReturnsSpecifiedValue() { assertThat(getException("test-message").errorCode()).isEqualTo(getSpecifiedErrorCode()); }
public static int errorCodeFromException(Throwable ex) { if (ex instanceof RSocketException) { return ((RSocketException) ex).errorCode(); } return APPLICATION_ERROR; }