public class ServiceException extends RuntimeException implements org.kohsuke.stapler.HttpResponse
ServiceException.ErrorMessage| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceException.BadRequestExpception |
static class |
ServiceException.ConflictException |
static class |
ServiceException.ErrorMessage
Describes JSON based error message.
|
static class |
ServiceException.ForbiddenException |
static class |
ServiceException.MethodNotAllowedException |
static class |
ServiceException.NotFoundException
Convenience exception classes modeled after HTTP exceptions
|
static class |
ServiceException.NotImplementedException |
static class |
ServiceException.TooManyRequestsException |
static class |
ServiceException.UnauthorizedException |
static class |
ServiceException.UnexpectedErrorException |
static class |
ServiceException.UnprocessableEntityException |
static class |
ServiceException.UnsupportedMediaTypeException |
| Modifier and Type | Field and Description |
|---|---|
static int |
BAD_REQUEST |
static int |
CONFLICT |
ServiceException.ErrorMessage |
errorMessage |
static int |
FORBIDDEN |
static int |
INTERNAL_SERVER_ERROR |
static int |
METHOD_NOT_ALLOWED |
static int |
NOT_FOUND |
static int |
NOT_IMPLEMENTED |
int |
status |
static int |
TOO_MANY_REQUESTS |
static int |
UNAUTHORIZED |
static int |
UNPROCESSABLE_ENTITY |
static int |
UNSUPPORTED_MEDIA_TYPE |
| Constructor and Description |
|---|
ServiceException(int status,
ServiceException.ErrorMessage errorMessage,
Throwable cause) |
ServiceException(int status,
String message) |
ServiceException(int status,
String message,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
void |
generateResponse(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
Object node) |
String |
toJson()
Convert ErrorMessage to JSON
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic final int status
public final ServiceException.ErrorMessage errorMessage
public static final int BAD_REQUEST
public static final int UNAUTHORIZED
public static final int FORBIDDEN
public static final int NOT_FOUND
public static final int METHOD_NOT_ALLOWED
public static final int UNSUPPORTED_MEDIA_TYPE
public static final int CONFLICT
public static final int UNPROCESSABLE_ENTITY
public static final int TOO_MANY_REQUESTS
public static final int INTERNAL_SERVER_ERROR
public static final int NOT_IMPLEMENTED
public ServiceException(int status,
String message)
public ServiceException(int status,
ServiceException.ErrorMessage errorMessage,
Throwable cause)
public String toJson()
public void generateResponse(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
Object node)
throws IOException,
javax.servlet.ServletException
generateResponse in interface org.kohsuke.stapler.HttpResponseIOExceptionjavax.servlet.ServletExceptionCopyright © 2016. All rights reserved.