Module org.htmlunit

Class MalformedCookieException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.htmlunit.http.MalformedCookieException
All Implemented Interfaces:
Serializable

public class MalformedCookieException extends Exception
Exception thrown when a cookie string cannot be parsed or does not conform to the cookie specification.

This exception is thrown in the following scenarios:

  • The cookie string is null
  • The cookie name is empty or invalid
  • The domain attribute is malformed or invalid
  • The expires attribute cannot be parsed as a valid date
  • The max-age attribute is not a valid integer
  • Any other violation of the HTTP cookie specification (RFC 2109, RFC 2965, Netscape spec)
Author:
Ronald Brill
See Also:
  • Constructor Details

    • MalformedCookieException

      public MalformedCookieException(String message)
      Constructs a new MalformedCookieException with the specified detail message.
      Parameters:
      message - the detail message explaining why the cookie is malformed
    • MalformedCookieException

      public MalformedCookieException(String message, Throwable cause)
      Constructs a new MalformedCookieException with the specified detail message and cause.
      Parameters:
      message - the detail message explaining why the cookie is malformed
      cause - the underlying cause of this exception (e.g., a parsing exception)