Class FailureItemException

    • Constructor Detail

      • FailureItemException

        public FailureItemException​(FailureItem item)
        Returns an exception wrapping the failure item.
        Parameters:
        item - the failure item
      • FailureItemException

        public FailureItemException​(FailureReason reason,
                                    String messageTemplate,
                                    Object... messageArgs)
        Returns an exception from a reason and message.

        The message is produced using a template that contains zero to many "{argName}" placeholders. Each placeholder is replaced by the next available argument. If there are too few arguments, then the message will be left with placeholders. If there are too many arguments, then the excess arguments are appended to the end of the message. No attempt is made to format the arguments. See Messages.formatWithAttributes(String, Object...) for more details.

        Parameters:
        reason - the reason
        messageTemplate - a message explaining the failure, not empty, uses "{argName}" for inserting messageArgs
        messageArgs - the arguments for the message
      • FailureItemException

        public FailureItemException​(FailureReason reason,
                                    Throwable cause,
                                    String messageTemplate,
                                    Object... messageArgs)
        Returns an exception from a reason, cause and message.

        The message is produced using a template that contains zero to many "{argName}" placeholders. Each placeholder is replaced by the next available argument. If there are too few arguments, then the message will be left with placeholders. If there are too many arguments, then the excess arguments are appended to the end of the message. No attempt is made to format the arguments. See Messages.formatWithAttributes(String, Object...) for more details.

        Parameters:
        reason - the reason
        cause - the cause
        messageTemplate - a message explaining the failure, not empty, uses "{argName}" for inserting messageArgs
        messageArgs - the arguments for the message