/** * Returns a builder for fluently creating instances of {@code JsonRuntimeException}s.. * * @param errorCode a code which uniquely identifies the exception. * @return a new builder for JsonRuntimeException objects. * @throws NullPointerException if {@code errorCode} is {@code null}. * @throws IllegalArgumentException if {@code errorCode} is empty. */ public static JsonExceptionBuilder newBuilder(final String errorCode) { checkErrorCode(errorCode); return new Builder(errorCode); }
/** * Returns a builder for fluently creating instances of {@code JsonRuntimeException}s.. * * @param errorCode a code which uniquely identifies the exception. * @return a new builder for JsonRuntimeException objects. * @throws NullPointerException if {@code errorCode} is {@code null}. * @throws IllegalArgumentException if {@code errorCode} is empty. */ public static JsonExceptionBuilder newBuilder(final String errorCode) { checkErrorCode(errorCode); return new Builder(errorCode); }
/** * Constructs a new {@code JsonRuntimeException} object with the specified values. * * @param errorCode the error code of the exception. * @param message the detail message for later retrieval with {@link #getMessage()}. * @param description a description with further information about the exception. * @param cause the cause of the exception for later retrieval with {@link #getCause()}. * @param href a link to a resource which provides further information about the exception. * @throws NullPointerException if {@code errorCode} is {@code null}. * @throws IllegalArgumentException if {@code errorCode} is empty. */ protected JsonRuntimeException(final String errorCode, @Nullable final String message, @Nullable final String description, @Nullable final Throwable cause, @Nullable final URI href) { super(message, cause); checkErrorCode(errorCode); this.errorCode = errorCode; this.description = description; this.href = href; }
/** * Constructs a new {@code JsonRuntimeException} object with the specified values. * * @param errorCode the error code of the exception. * @param message the detail message for later retrieval with {@link #getMessage()}. * @param description a description with further information about the exception. * @param cause the cause of the exception for later retrieval with {@link #getCause()}. * @param href a link to a resource which provides further information about the exception. * @throws NullPointerException if {@code errorCode} is {@code null}. * @throws IllegalArgumentException if {@code errorCode} is empty. */ protected JsonRuntimeException(final String errorCode, @Nullable final String message, @Nullable final String description, @Nullable final Throwable cause, @Nullable final URI href) { super(message, cause); checkErrorCode(errorCode); this.errorCode = errorCode; this.description = description; this.href = href; }