public class ServiceException extends RuntimeException implements org.kohsuke.stapler.HttpResponse
ErrorMessage
Modifier and Type | Class and Description |
---|---|
static class |
ServiceException.BadRequestException |
static class |
ServiceException.ConflictException |
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.PreconditionRequired |
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 |
ErrorMessage |
errorMessage |
static int |
FORBIDDEN |
static int |
INTERNAL_SERVER_ERROR |
static int |
METHOD_NOT_ALLOWED |
static int |
NOT_FOUND |
static int |
NOT_IMPLEMENTED |
static int |
PRECONDITION_REQUIRED |
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,
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, toString
public final int status
public final 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 PRECONDITION_REQUIRED
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, 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.HttpResponse
IOException
javax.servlet.ServletException
Copyright © 2016–2018. All rights reserved.