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 classBodyProcessorException.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 BodyProcessorExceptioncreateMissingMatchingBodyProcessor(String contentType)static BodyProcessorExceptioncreateParsingError(String contentType, DecodeException cause)static BodyProcessorExceptioncreateParsingError(String contentType, MalformedValueException cause)static BodyProcessorExceptioncreateValidationError(String contentType, Throwable cause)StringgetActualContentType()BodyProcessorException.BodyProcessorErrorTypegetErrorType()JsonObjecttoJson()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:BadRequestExceptionReturns a Json representation of the exception- Overrides:
toJsonin 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)
-
-