Class InvalidArgumentException

All Implemented Interfaces:
Serializable

public final class InvalidArgumentException extends IllegalArgumentException
Thrown when a method argument cannot be decoded or validated.

The dispatcher maps this exception to an invalid-params JSON-RPC error response rather than an internal failure.

See Also:
  • Constructor Details

    • InvalidArgumentException

      public InvalidArgumentException(String argName, String message)
      Constructs a new InvalidArgumentException.
      Parameters:
      argName - the name of the invalid argument
      message - the detail message
    • InvalidArgumentException

      public InvalidArgumentException(String argName, String message, Throwable cause)
      Constructs a new InvalidArgumentException with a cause.
      Parameters:
      argName - the name of the invalid argument
      message - the detail message
      cause - the cause
  • Method Details

    • argName

      public String argName()
      Returns the name of the invalid argument.
      Returns:
      the argument name