Class InvalidFieldException

  • All Implemented Interfaces:
    Serializable

    public class InvalidFieldException
    extends DRException
    Exception indicating reference to an invalid field (or fields) in a record structure.
    See Also:
    Serialized Form
    • Constructor Detail

      • InvalidFieldException

        public InvalidFieldException​(Collection<String> invalid,
                                     Collection<String> available)
        Constructs an InvalidFieldException with an empty message.
        Parameters:
        invalid - Unordered Collection of the names of invalid fields
        available - Unordered Collection of the names of valid fields which were available
      • InvalidFieldException

        public InvalidFieldException​(String msg,
                                     Collection<String> invalid,
                                     Collection<String> available)
        Constructs an InvalidFieldException with the specified message.
        Parameters:
        msg - String containing the desired message
        invalid - Unordered Collection of the names of invalid fields
        available - Unordered Collection of the names of valid fields which were available
    • Method Detail

      • getMessage

        public String getMessage()
        Retrieves message of the super class with a list of the names of all invalid fields in lexicographic order appended.
        Overrides:
        getMessage in class Throwable
        Returns:
        String containing the message of this exception followed by a list of invalid field names
      • getInvalidFields

        public String[] getInvalidFields()
        Retrieves an array of invalid field names.
        Returns:
        String[] of invalid field names
      • getAvailableFields

        public String[] getAvailableFields()
        Retrieves an array of valid field names which were available.
        Returns:
        String[] of valid field names