Top Description Fields Constructors Methods
jakarta.ws.rs

public Class ServerErrorException

extends WebApplicationException
Class Inheritance
Known Direct Subclasses
jakarta.ws.rs.ServiceUnavailableException, jakarta.ws.rs.InternalServerErrorException
Imports
jakarta.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(final Response.Status
server error status. Must be a 5xx status code.
status
)

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

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

Construct a new server error exception.

Method Summary

Inherited from jakarta.ws.rs.WebApplicationException:
getResponsevalidatevalidate

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.ws.rs.WebApplicationException.serialVersionUID.

Constructor Detail

ServerErrorExceptionback to summary
public ServerErrorException(final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final String message, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final String message, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final String message, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final Response.Status status, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final String message, final Response.Status status, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final int status, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final String message, final int status, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final Response response, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.
ServerErrorExceptionback to summary
public ServerErrorException(final String message, final Response response, final 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 jakarta.ws.rs.core.Response.Status.Family#SERVER_ERROR status code family.