Package org.apache.juneau.rest.arg
Class ArgException
- All Implemented Interfaces:
Serializable,HttpMessage,HttpResponse
General exception due to a malformed Java parameter.
See Also:
-
Field Summary
Fields inherited from class org.apache.juneau.http.response.InternalServerError
INSTANCE, REASON_PHRASE, STATUS_CODE -
Constructor Summary
ConstructorsModifierConstructorDescriptionArgException(ParameterInfo pi, String msg, Object... args) Constructor.protectedArgException(ArgException copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a modifiable copy of this bean.setContent(String value) Sets the body on this response.setContent(HttpEntity value) Sets the body on this response.setHeader2(String name, Object value) Sets a header on this response.setHeaders(List<Header> values) Sets the specified headers on this response.setHeaders(HeaderList value) Sets the specified headers on this response.setHeaders2(Header... values) Sets multiple headers on this response.setLocale2(Locale value) Sets the locale used to retrieve reason phrases.setMessage(String message, Object... args) Sets the detail message on this exception.Sets the protocol version on the status line.setReasonPhrase2(String value) Sets the reason phrase on the status line.Sets the reason phrase catalog used to retrieve reason phrases.setStatusLine(BasicStatusLine value) Sets the protocol version on the status line.Specifies whether this bean should be unmodifiable.Methods inherited from class org.apache.juneau.http.response.InternalServerError
setStatusCode2Methods inherited from class org.apache.juneau.http.response.BasicHttpException
addHeader, addHeader, assertStatusCode, containsHeader, getAllHeaders, getEntity, getFirstHeader, getFullStackMessage, getHeaders, getHeaders, getLastHeader, getLocale, getMessage, getParams, getProtocolVersion, getRootCause, getStatusLine, hashCode, headerIterator, headerIterator, removeHeader, removeHeaders, setEntity, setHeader, setHeader, setHeaders, setLocale, setParams, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ArgException
Constructor.- Parameters:
pi- The parameter with the issue.msg- The message.args- The message args.
-
ArgException
Copy constructor.- Parameters:
copyFrom- The object to copy.
-
-
Method Details
-
copy
Description copied from class:InternalServerErrorCreates a modifiable copy of this bean.- Overrides:
copyin classInternalServerError- Returns:
- A new modifiable bean.
-
setContent
Description copied from class:BasicHttpExceptionSets the body on this response.- Overrides:
setContentin classInternalServerError- Parameters:
value- The body on this response.- Returns:
- This object.
-
setContent
Description copied from class:BasicHttpExceptionSets the body on this response.- Overrides:
setContentin classInternalServerError- Parameters:
value- The body on this response.- Returns:
- This object.
-
setHeader2
Description copied from class:BasicHttpExceptionSets a header on this response.- Overrides:
setHeader2in classInternalServerError- Parameters:
name- The header name.value- The header value.- Returns:
- This object.
-
setHeaders
Description copied from class:BasicHttpExceptionSets the specified headers on this response.- Overrides:
setHeadersin classInternalServerError- Parameters:
value- The new value.- Returns:
- This object.
-
setHeaders
Description copied from class:BasicHttpExceptionSets the specified headers on this response.- Overrides:
setHeadersin classInternalServerError- Parameters:
values- The headers to set.null values are ignored.- Returns:
- This object.
-
setHeaders2
Description copied from class:BasicHttpExceptionSets multiple headers on this response.- Overrides:
setHeaders2in classInternalServerError- Parameters:
values- The headers to add.- Returns:
- This object.
-
setLocale2
Description copied from class:BasicHttpExceptionSets the locale used to retrieve reason phrases.If not specified, uses
Locale.getDefault().- Overrides:
setLocale2in classInternalServerError- Parameters:
value- The new value.- Returns:
- This object.
-
setMessage
Description copied from class:BasicRuntimeExceptionSets the detail message on this exception.- Overrides:
setMessagein classInternalServerError- Parameters:
message- The message.args- The message args.- Returns:
- This object.
-
setProtocolVersion
Description copied from class:BasicHttpExceptionSets the protocol version on the status line.If not specified,
"HTTP/1.1" will be used.- Overrides:
setProtocolVersionin classInternalServerError- Parameters:
value- The new value.- Returns:
- This object.
-
setReasonPhrase2
Description copied from class:BasicHttpExceptionSets the reason phrase on the status line.If not specified, the reason phrase will be retrieved from the reason phrase catalog using the locale on this builder.
- Overrides:
setReasonPhrase2in classInternalServerError- Parameters:
value- The new value.- Returns:
- This object.
-
setReasonPhraseCatalog
Description copied from class:BasicHttpExceptionSets the reason phrase catalog used to retrieve reason phrases.If not specified, uses
EnglishReasonPhraseCatalog.- Overrides:
setReasonPhraseCatalogin classInternalServerError- Parameters:
value- The new value.- Returns:
- This object.
-
setStatusLine
Description copied from class:BasicHttpExceptionSets the protocol version on the status line.If not specified,
"HTTP/1.1" will be used.- Overrides:
setStatusLinein classInternalServerError- Parameters:
value- The new value.- Returns:
- This object.
-
setUnmodifiable
Description copied from class:BasicHttpExceptionSpecifies whether this bean should be unmodifiable.When enabled, attempting to set any properties on this bean will cause an
UnsupportedOperationException.- Overrides:
setUnmodifiablein classInternalServerError- Returns:
- This object.
-