Package ratpack.parse

Class 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.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NoSuchParserException

        public NoSuchParserException​(com.google.common.reflect.TypeToken<?> type,
                                     java.lang.Object opts,
                                     java.lang.String contentType)
        Constructor.
        Parameters:
        type - the target type
        opts - the parse options
        contentType - 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 type
        opts - the parse options
        contentType - The content type of the request
        parsers - 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