/** * Constructor. * * @param status * The status to copy. * @param description * The description of the encapsulated status. */ public ResourceException(Status status, String description) { this(new Status(status, description)); }
/** * Constructor. * * @param status * The status to copy. * @param description * The description of the encapsulated status. */ public ResourceException(final Status status, final String description) { this(new Status(status, description)); }
/** * Constructor. * * @param code * The specification code of the encapsulated status. * @param cause * The wrapped cause error or exception. */ public ResourceException(int code, Throwable cause) { this(new Status(code, cause), cause); }
/** * Constructor. * * @param code * The specification code of the encapsulated status. */ public ResourceException(int code) { this(new Status(code)); }
/** * Constructor. * * @param code * The specification code of the encapsulated status. */ public ResourceException(final int code) { this(new Status(code)); }
/** * Constructor. * * @param code * The specification code of the encapsulated status. * @param cause * The wrapped cause error or exception. */ public ResourceException(final int code, final Throwable cause) { this(new Status(code, cause), cause); }
/** * Constructor that set the status to * {@link org.restlet.data.Status#SERVER_ERROR_INTERNAL} including the * related error or exception. * * @param cause * The wrapped cause error or exception. */ public ResourceException(final Throwable cause) { this(new Status(Status.SERVER_ERROR_INTERNAL, cause), cause); }
/** * Constructor. * * @param code * The specification code of the encapsulated status. * @param reasonPhrase * The short reason phrase displayed next to the status code in a * HTTP response. */ public ResourceException(int code, String reasonPhrase) { this(new Status(code, reasonPhrase)); }
/** * Constructor that set the status to {@link org.restlet.data.Status#SERVER_ERROR_INTERNAL} including the * related error or exception. * * @param cause * The wrapped cause error or exception. */ public ResourceException(Throwable cause) { this(new Status(Status.SERVER_ERROR_INTERNAL, cause), cause); }
public OntopiaRestException(Status status, Throwable cause) { super(cause); this.status = new Status(status, this); }
/** * Constructor. * * @param code * The specification code of the encapsulated status. */ public ResourceException(int code) { this(new Status(code)); }
/** * Constructor. * * @param code * The specification code of the encapsulated status. * @param cause * The wrapped cause error or exception. */ public ResourceException(int code, Throwable cause) { this(new Status(code, cause), cause); }
/** * Constructor that set the status to * {@link org.restlet.data.Status#SERVER_ERROR_INTERNAL} including the * related error or exception. * * @param cause * The wrapped cause error or exception. */ public ResourceException(Throwable cause) { this(new Status(Status.SERVER_ERROR_INTERNAL, cause), cause); }
/** * Constructor. * * @param status * The status to copy. * @param description * The description of the encapsulated status. */ public ResourceException(Status status, String description) { this(new Status(status, description)); }
private Status getStatus(final Status status, final Exception e) { if (e == null || e.getMessage() == null) { return status; } return new Status(status, e.getMessage()); }
/** * Sets the status. * * @param status * The status to set. * @param message * The status message. */ public void setStatus(Status status, String message) { setStatus(new Status(status, message)); }
/** * Sets the status. * * @param status * The status to set (code and reason phrase). * @param description * The longer status description. */ public void setStatus(Status status, String description) { setStatus(new Status(status, description)); }
/** * Sets the status. * * @param status * The status to set. * @param throwable * The related error or exception. */ public void setStatus(Status status, Throwable throwable) { setStatus(new Status(status, throwable)); }
/** * Invoked when an error response status is received. * * @param errorStatus * The error status received. * @param errorMessage * The custom error message. */ protected final void doError(Status errorStatus, String errorMessage) { doError(new Status(errorStatus, errorMessage)); }
/** * Sets the status. * * @param status * The status to set. * @param throwable * The related error or exception. */ public void setStatus(Status status, Throwable throwable) { setStatus(new Status(status, throwable)); }