Class BadStemValueException

  • All Implemented Interfaces:
    Serializable

    public class BadStemValueException
    extends QDLExceptionWithTrace
    This is used when recursing a stem with E.g. ProcessScalar in QDLAggregateUtil. Throw this exception when there is a bad argument and add the current key to the list of indices.

    Usage

    Just throw this with no key. The QDLAggregateUtil will fill in any keys at runtime. If there are keys (possible that only set operations are called) then stem index will be added to any message you set, along with the parsing location of the error. A typical error message reads
         integer value not allowed [stem index: b.0.3.d] at (1, 7)
     
    See Also:
    Serialized Form
    • Constructor Detail

      • BadStemValueException

        public BadStemValueException​(Statement statement)
      • BadStemValueException

        public BadStemValueException​(Throwable cause,
                                     Statement statement)
      • BadStemValueException

        public BadStemValueException​(String message,
                                     Statement statement)
      • BadStemValueException

        public BadStemValueException​(String message,
                                     Object index)
      • BadStemValueException

        public BadStemValueException​(String message)
    • Method Detail

      • setIndices

        public void setIndices​(List<Object> indices)
      • toIndexString

        public String toIndexString()
        Reverses the order of the elements in getIndices() and returns a formatted string that is the index the user would add. So if the indices are [0,"foo",3,"bar"] this returns the string
             'bar.3.foo.0'
         
        which is what the user would use to access the element
        Returns:
      • getMessage

        public String getMessage()
        Automatically appends the index to the message.
        Overrides:
        getMessage in class Throwable
        Returns: