Class NullFieldException

  • All Implemented Interfaces:
    Serializable

    @Public
    public class NullFieldException
    extends RuntimeException
    An exception specifying that a required field was not set in a record, i.e. was null .
    See Also:
    Serialized Form
    • Constructor Detail

      • NullFieldException

        public NullFieldException()
        Constructs an NullFieldException with null as its error detail message.
      • NullFieldException

        public NullFieldException​(String message)
        Constructs an NullFieldException with the specified detail message.
        Parameters:
        message - The detail message.
      • NullFieldException

        public NullFieldException​(int fieldIdx)
        Constructs an NullFieldException with a default message, referring to given field number as the null field.
        Parameters:
        fieldIdx - The index of the field that was null, but expected to hold a value.
      • NullFieldException

        public NullFieldException​(int fieldIdx,
                                  Throwable cause)
        Constructs an NullFieldException with a default message, referring to given field number as the null field and a cause (Throwable)
        Parameters:
        fieldIdx - The index of the field that was null, but expected to hold a value.
        cause - Pass the root cause of the error
    • Method Detail

      • getFieldPos

        public int getFieldPos()
        Gets the field number that was attempted to access. If the number is not set, this method returns -1.
        Returns:
        The field number that was attempted to access, or -1, if not set.