/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param message A error message. Required. * @param cause The cause of the problem. */ public Err(final int status, final String message, final Throwable cause) { super(message("", status, message), cause); this.status = status; }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param cause The cause of the problem. */ public Err(final Status status, final Throwable cause) { super(message(status, null), cause); this.status = status.value(); }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param message A error message. Required. */ public Err(final Status status, final String message) { super(message(status, message)); this.status = status.value(); }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param message A error message. Required. * @param cause The cause of the problem. */ public Err(final Status status, final String message, final Throwable cause) { super(message(status, message), cause); this.status = status.value(); }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. */ public Err(final Status status) { super(message(status, null)); this.status = status.value(); }
/** * Build an error message using the HTTP status. * * @param status The HTTP Status. * @param tail A message to append. * @return An error message. */ private static String message(final Status status, @Nullable final String tail) { return message(status.reason(), status.value(), tail); }
/** * Creates a new {@link Err}. * * @param status A web socket close status. Required. * @param message Close message. */ public Err(final WebSocket.CloseStatus status, final String message) { super(message(status.reason(), status.code(), message)); this.status = status.code(); }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param message A error message. Required. * @param cause The cause of the problem. */ public Err(final int status, final String message, final Throwable cause) { super(message("", status, message), cause); this.status = status; }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param message A error message. Required. * @param cause The cause of the problem. */ public Err(final Status status, final String message, final Throwable cause) { super(message(status, message), cause); this.status = status.value(); }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param message A error message. Required. */ public Err(final Status status, final String message) { super(message(status, message)); this.status = status.value(); }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. * @param cause The cause of the problem. */ public Err(final Status status, final Throwable cause) { super(message(status, null), cause); this.status = status.value(); }
/** * Creates a new {@link Err}. * * @param status A HTTP status. Required. */ public Err(final Status status) { super(message(status, null)); this.status = status.value(); }
/** * Build an error message using the HTTP status. * * @param status The HTTP Status. * @param tail A message to append. * @return An error message. */ private static String message(final Status status, @Nullable final String tail) { return message(status.reason(), status.value(), tail); }
/** * Creates a new {@link Err}. * * @param status A web socket close status. Required. * @param message Close message. */ public Err(final WebSocket.CloseStatus status, final String message) { super(message(status.reason(), status.code(), message)); this.status = status.code(); }