Package ratpack.core.parse
Class NoSuchParserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ratpack.core.parse.ParseException
-
- ratpack.core.parse.NoSuchParserException
-
- All Implemented Interfaces:
Serializable
public class NoSuchParserException extends ParseException
Thrown when a request is made to parse the request, but no suitable parser was found that matched the content type and parse object.- See Also:
Context.parse(Parse), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NoSuchParserException(com.google.common.reflect.TypeToken<?> type, Object opts, String contentType)Constructor.NoSuchParserException(com.google.common.reflect.TypeToken<?> type, Object opts, String contentType, Iterable<Parser<?>> parsers)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()The content type of the request.ObjectgetOpts()The parse opts.com.google.common.reflect.TypeToken<?>getType()The target type.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
NoSuchParserException
public NoSuchParserException(com.google.common.reflect.TypeToken<?> type, Object opts, String contentType)Constructor.- Parameters:
type- the target typeopts- the parse optionscontentType- The content type of the request
-
NoSuchParserException
public NoSuchParserException(com.google.common.reflect.TypeToken<?> type, Object opts, String contentType, Iterable<Parser<?>> parsers)Constructor.- Parameters:
type- the target typeopts- the parse optionscontentType- The content type of the requestparsers- the parsers that had the opportunity to parse but didn't
-
-
Method Detail
-
getType
public com.google.common.reflect.TypeToken<?> getType()
The target type.- Returns:
- the target type
-
getOpts
public Object getOpts()
The parse opts.- Returns:
- the parse opts
-
getContentType
public String getContentType()
The content type of the request.- Returns:
- the content type of the request
-
-