Package org.apache.juneau.http.response
Class InternalServerError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.BasicRuntimeException
org.apache.juneau.http.response.BasicHttpException
org.apache.juneau.http.response.InternalServerError
- All Implemented Interfaces:
- Serializable,- HttpMessage,- HttpResponse
- Direct Known Subclasses:
- ArgException
@Response
@StatusCode(500)
@Schema(description="Internal Server Error")
public class InternalServerError
extends BasicHttpException
Exception representing an HTTP 500 (Internal Server Error).
 
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final InternalServerErrorReusable unmodifiable instancestatic final StringReason phrasestatic final intHTTP status code
- 
Constructor SummaryConstructorsModifierConstructorDescriptionConstructor.InternalServerError(String msg, Object... args) Constructor.InternalServerError(Throwable cause) Constructor.InternalServerError(Throwable cause, String msg, Object... args) Constructor.InternalServerError(HttpResponse response) Constructor.protectedInternalServerError(InternalServerError copyFrom) Copy constructor.
- 
Method SummaryModifier and TypeMethodDescriptioncopy()Creates a modifiable copy of this bean.setHeader2(String name, Object value) Sets a header 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.setStatusCode2(int code) Same asBasicHttpException.setStatusCode(int)but returns this object.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.BasicHttpExceptionaddHeader, addHeader, assertStatusCode, containsHeader, getAllHeaders, getEntity, getFirstHeader, getFullStackMessage, getHeaders, getHeaders, getLastHeader, getLocale, getMessage, getParams, getProtocolVersion, getRootCause, getStatusLine, hashCode, headerIterator, headerIterator, removeHeader, removeHeaders, setContent, setContent, setEntity, setHeader, setHeader, setHeaders, setHeaders, setLocale, setParams, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine, toStringMethods inherited from class org.apache.juneau.BasicRuntimeExceptionassertModifiable, fillInStackTrace, getCause, initCause, isUnmodifiable, setStackTrace, unwrapMethods inherited from class java.lang.ThrowableaddSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace
- 
Field Details- 
STATUS_CODEHTTP status code- See Also:
 
- 
REASON_PHRASEReason phrase- See Also:
 
- 
INSTANCEReusable unmodifiable instance
 
- 
- 
Constructor Details- 
InternalServerErrorConstructor.- Parameters:
- cause- The caused-by exception. Can be- null .
- msg- The message. Can be- null .
- args- The message arguments.
 
- 
InternalServerErrorpublic InternalServerError()Constructor.
- 
InternalServerErrorConstructor.- Parameters:
- msg- The message. Can be- null .
- args- Optional- MessageFormat-style arguments in the message.
 
- 
InternalServerErrorConstructor.- Parameters:
- cause- The cause. Can be- null .
 
- 
InternalServerErrorConstructor.This is the constructor used when parsing an HTTP response. - Parameters:
- response- The HTTP response to copy from. Must not be- null .
- Throws:
- AssertionError- If HTTP response status code does not match what was expected.
 
- 
InternalServerErrorCopy constructor.- Parameters:
- copyFrom- The bean to copy.
 
 
- 
- 
Method Details- 
copyCreates a modifiable copy of this bean.- Returns:
- A new modifiable bean.
 
- 
setMessageDescription copied from class:BasicRuntimeExceptionSets the detail message on this exception.- Overrides:
- setMessagein class- BasicHttpException
- Parameters:
- message- The message.
- args- The message args.
- Returns:
- This object.
 
- 
setUnmodifiableDescription 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 class- BasicHttpException
- Returns:
- This object.
 
- 
setHeader2Description copied from class:BasicHttpExceptionSets a header on this response.- Overrides:
- setHeader2in class- BasicHttpException
- Parameters:
- name- The header name.
- value- The header value.
- Returns:
- This object.
 
- 
setHeadersDescription copied from class:BasicHttpExceptionSets the specified headers on this response.- Overrides:
- setHeadersin class- BasicHttpException
- Parameters:
- value- The new value.
- Returns:
- This object.
 
- 
setHeaders2Description copied from class:BasicHttpExceptionSets multiple headers on this response.- Overrides:
- setHeaders2in class- BasicHttpException
- Parameters:
- values- The headers to add.
- Returns:
- This object.
 
- 
setLocale2Description copied from class:BasicHttpExceptionSets the locale used to retrieve reason phrases.If not specified, uses Locale.getDefault().- Overrides:
- setLocale2in class- BasicHttpException
- Parameters:
- value- The new value.
- Returns:
- This object.
 
- 
setProtocolVersionDescription copied from class:BasicHttpExceptionSets the protocol version on the status line.If not specified, "HTTP/1.1" will be used.- Overrides:
- setProtocolVersionin class- BasicHttpException
- Parameters:
- value- The new value.
- Returns:
- This object.
 
- 
setReasonPhrase2Description 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 class- BasicHttpException
- Parameters:
- value- The new value.
- Returns:
- This object.
 
- 
setReasonPhraseCatalogDescription copied from class:BasicHttpExceptionSets the reason phrase catalog used to retrieve reason phrases.If not specified, uses EnglishReasonPhraseCatalog.- Overrides:
- setReasonPhraseCatalogin class- BasicHttpException
- Parameters:
- value- The new value.
- Returns:
- This object.
 
- 
setStatusCode2Description copied from class:BasicHttpExceptionSame asBasicHttpException.setStatusCode(int)but returns this object.- Overrides:
- setStatusCode2in class- BasicHttpException
- Parameters:
- code- The new status code.
- Returns:
- This object.
- Throws:
- IllegalStateException- If status code could not be set.
 
- 
setStatusLineDescription copied from class:BasicHttpExceptionSets the protocol version on the status line.If not specified, "HTTP/1.1" will be used.- Overrides:
- setStatusLinein class- BasicHttpException
- Parameters:
- value- The new value.
- Returns:
- This object.
 
 
-