Class InvalidArgumentException

  • All Implemented Interfaces:
    Serializable

    public class InvalidArgumentException
    extends ServiceException
    The InvalidArgumentException exception is thrown to indicate an error condition as a result of an invalid argument.

    This is a checked exception to prevent the automatic rollback of the current transaction.

    Author:
    Marcus Portmann
    See Also:
    Serialized Form
    • Constructor Detail

      • InvalidArgumentException

        public InvalidArgumentException​(String parameter)
        Constructs a new InvalidArgumentException.
        Parameters:
        parameter - the name of the parameter associated with the invalid argument
      • InvalidArgumentException

        public InvalidArgumentException​(String parameter,
                                        List<ValidationError> validationErrors)
        Constructs a new InvalidArgumentException.
        Parameters:
        parameter - the name of the parameter associated with the invalid argument
        validationErrors - the validation errors associated with the invalid argument
    • Method Detail

      • getInvalidArgumentError

        public InvalidArgumentError getInvalidArgumentError()
        Returns the invalid argument error info.
        Returns:
        the invalid argument error info
      • getParameter

        public String getParameter()
        Returns the name of the parameter associated with the invalid argument.
        Returns:
        the name of the parameter associated with the invalid argument
      • getValidationErrors

        public List<ValidationError> getValidationErrors()
        Returns the optional validation errors associated with the invalid argument.
        Returns:
        the optional validation errors associated with the invalid argument