@Test public void testInstantiationWithCodeMessageAndCause() { final ErrorException exception = new ErrorException(1, "Not supported!", new UnsupportedOperationException()); assertThat(exception.getCode(), is(1)); assertThat(exception.getMessage(), is("Not supported!")); assertThat(exception.getCause(), instanceOf(UnsupportedOperationException.class)); }
public final int getCode() { return code; }
ErrorException extends RuntimeException { public final int getCode() { return code; } }
ErrorException extends RuntimeException { public final int getCode() { return code; } ErrorException(final int code);  ErrorException(final int code, @Nullable final String message);  ErrorException(final int code, @Nullable final Throwable cause);  ErrorException(final int code, @Nullable final String message, @Nullable final Throwable cause); }
ErrorException extends RuntimeException { public final int getCode() { return code; } ErrorException(final int code);  ErrorException(final int code, @Nullable final String message);  ErrorException(final int code, @Nullable final Throwable cause);  ErrorException(final int code, @Nullable final String message, @Nullable final Throwable cause); @NonNull static ErrorException withCode(final int code); final int getCode(); }
ErrorException extends RuntimeException { public final int getCode() { return code; } ErrorException(final int code);  ErrorException(final int code, @Nullable final String message);  ErrorException(final int code, @Nullable final Throwable cause);  ErrorException(final int code, @Nullable final String message, @Nullable final Throwable cause); @NonNull static ErrorException withCode(final int code); final int getCode();  }