Package ratpack.parse
Class NoSuchParserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ratpack.parse.ParseException
-
- ratpack.parse.NoSuchParserException
-
- All Implemented Interfaces:
java.io.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, java.lang.Object opts, java.lang.String contentType)
Constructor.NoSuchParserException(com.google.common.reflect.TypeToken<?> type, java.lang.Object opts, java.lang.String contentType, java.lang.Iterable<Parser<?>> parsers)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContentType()
The content type of the request.java.lang.Object
getOpts()
The parse opts.com.google.common.reflect.TypeToken<?>
getType()
The target type.
-
-
-
Constructor Detail
-
NoSuchParserException
public NoSuchParserException(com.google.common.reflect.TypeToken<?> type, java.lang.Object opts, java.lang.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, java.lang.Object opts, java.lang.String contentType, java.lang.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 java.lang.Object getOpts()
The parse opts.- Returns:
- the parse opts
-
getContentType
public java.lang.String getContentType()
The content type of the request.- Returns:
- the content type of the request
-
-