Package io.vertx.ext.web.validation
Class BodyProcessorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.vertx.core.VertxException
-
- io.vertx.ext.web.validation.BadRequestException
-
- io.vertx.ext.web.validation.BodyProcessorException
-
- All Implemented Interfaces:
Serializable
public class BodyProcessorException extends BadRequestException
Represents an exception while processing a body- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BodyProcessorException.BodyProcessorErrorType
-
Constructor Summary
Constructors Constructor Description BodyProcessorException(String message, Throwable cause, String actualContentType, BodyProcessorException.BodyProcessorErrorType errorType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BodyProcessorException
createMissingMatchingBodyProcessor(String contentType)
static BodyProcessorException
createParsingError(String contentType, DecodeException cause)
static BodyProcessorException
createParsingError(String contentType, MalformedValueException cause)
static BodyProcessorException
createValidationError(String contentType, Throwable cause)
String
getActualContentType()
BodyProcessorException.BodyProcessorErrorType
getErrorType()
JsonObject
toJson()
Returns a Json representation of the exception-
Methods inherited from class io.vertx.core.VertxException
noStackTrace, noStackTrace, noStackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
BodyProcessorException
public BodyProcessorException(String message, Throwable cause, String actualContentType, BodyProcessorException.BodyProcessorErrorType errorType)
-
-
Method Detail
-
getActualContentType
public String getActualContentType()
-
getErrorType
public BodyProcessorException.BodyProcessorErrorType getErrorType()
-
toJson
public JsonObject toJson()
Description copied from class:BadRequestException
Returns a Json representation of the exception- Overrides:
toJson
in classBadRequestException
- Returns:
-
createParsingError
public static BodyProcessorException createParsingError(String contentType, MalformedValueException cause)
-
createParsingError
public static BodyProcessorException createParsingError(String contentType, DecodeException cause)
-
createValidationError
public static BodyProcessorException createValidationError(String contentType, Throwable cause)
-
createMissingMatchingBodyProcessor
public static BodyProcessorException createMissingMatchingBodyProcessor(String contentType)
-
-