Class InvalidMediaTypeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.springframework.http.InvalidMediaTypeException
- All Implemented Interfaces:
Serializable
Exception thrown from
MediaType.parseMediaType(String) in case of
encountering an invalid media type specification String.- Since:
- 3.2.2
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidMediaTypeException(String mediaType, @Nullable String message) Create a new InvalidMediaTypeException for the given media type. -
Method Summary
Modifier and TypeMethodDescriptionReturn the offending media type.Returns the detail message string of this exception instance (nevernull).Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidMediaTypeException
-
-
Method Details
-
getMessage
Returns the detail message string of this exception instance (nevernull).- Overrides:
getMessagein classThrowable
-
getMediaType
Return the offending media type.
-