Top Description Fields Constructors Methods
javax.ws.rs

public Class ServerErrorException

extends WebApplicationException
Class Inheritance
Known Direct Subclasses
javax.ws.rs.ServiceUnavailableException, javax.ws.rs.InternalServerErrorException
Imports
javax.ws.rs.core.Response

A base runtime application exception indicating a server error (HTTP 5xx status codes).
Author
Marek Potociar
Since
2.0

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
ServerErrorException(Response.Status
server error status. Must be a 5xx status code.
status
)

Construct a new server error exception.

public
ServerErrorException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
Response.Status
server error status. Must be a 5xx status code.
status
)

Construct a new server error exception.

public
ServerErrorException(int
server error status. Must be a 5xx status code.
status
)

Construct a new server error exception.

public
ServerErrorException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
int
server error status. Must be a 5xx status code.
status
)

Construct a new server error exception.

public
ServerErrorException(Response
server error response. Must have a status code set to a 5xx status code.
response
)

Construct a new server error exception.

public
ServerErrorException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
Response
server error response. Must have a status code set to a 5xx status code.
response
)

Construct a new server error exception.

public
ServerErrorException(Response.Status
server error status. Must be a 5xx status code.
status
,
Throwable
the underlying cause of the exception.
cause
)

Construct a new server error exception.

public
ServerErrorException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
Response.Status
server error status. Must be a 5xx status code.
status
,
Throwable
the underlying cause of the exception.
cause
)

Construct a new server error exception.

public
ServerErrorException(int
server error status. Must be a 5xx status code.
status
,
Throwable
the underlying cause of the exception.
cause
)

Construct a new server error exception.

public
ServerErrorException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
int
server error status. Must be a 5xx status code.
status
,
Throwable
the underlying cause of the exception.
cause
)

Construct a new server error exception.

public
ServerErrorException(Response
server error response. Must have a status code set to a 5xx status code.
response
,
Throwable
the underlying cause of the exception.
cause
)

Construct a new server error exception.

public
ServerErrorException(String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
Response
server error response. Must have a status code set to a 5xx status code.
response
,
Throwable
the underlying cause of the exception.
cause
)

Construct a new server error exception.

Method Summary

Inherited from javax.ws.rs.WebApplicationException:
getResponsevalidatevalidate

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.ws.rs.WebApplicationException.serialVersionUID.

Constructor Detail

ServerErrorExceptionback to summary
public ServerErrorException(Response.Status status)

Construct a new server error exception.

Parameters
status:Response.Status

server error status. Must be a 5xx status code.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(String message, Response.Status status)

Construct a new server error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:Response.Status

server error status. Must be a 5xx status code.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(int status)

Construct a new server error exception.

Parameters
status:int

server error status. Must be a 5xx status code.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(String message, int status)

Construct a new server error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:int

server error status. Must be a 5xx status code.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(Response response)

Construct a new server error exception.

Parameters
response:Response

server error response. Must have a status code set to a 5xx status code.

Exceptions
IllegalArgumentException:
in case the response status code is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(String message, Response response)

Construct a new server error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

response:Response

server error response. Must have a status code set to a 5xx status code.

Exceptions
IllegalArgumentException:
in case the response status code is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(Response.Status status, Throwable cause)

Construct a new server error exception.

Parameters
status:Response.Status

server error status. Must be a 5xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(String message, Response.Status status, Throwable cause)

Construct a new server error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:Response.Status

server error status. Must be a 5xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(int status, Throwable cause)

Construct a new server error exception.

Parameters
status:int

server error status. Must be a 5xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(String message, int status, Throwable cause)

Construct a new server error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:int

server error status. Must be a 5xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(Response response, Throwable cause)

Construct a new server error exception.

Parameters
response:Response

server error response. Must have a status code set to a 5xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the response status code is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(String message, Response response, Throwable cause)

Construct a new server error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

response:Response

server error response. Must have a status code set to a 5xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the response status code is not from the javax.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.