Package org.qdl_lang.exceptions
Class BadStemValueException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- edu.uiuc.ncsa.security.core.exceptions.GeneralException
-
- org.qdl_lang.exceptions.QDLException
-
- org.qdl_lang.exceptions.QDLExceptionWithTrace
-
- org.qdl_lang.exceptions.BadStemValueException
-
- All Implemented Interfaces:
Serializable
public class BadStemValueException extends QDLExceptionWithTrace
This is used when recursing a stem with E.g.ProcessScalar
inQDLAggregateUtil
. 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. TheQDLAggregateUtil
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 readsinteger value not allowed [stem index: b.0.3.d] at (1, 7)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BadStemValueException(String message)
BadStemValueException(String message, Object index)
BadStemValueException(String message, Throwable cause, Statement statement)
BadStemValueException(String message, Statement statement)
BadStemValueException(Throwable cause, Statement statement)
BadStemValueException(Statement statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Object>
getIndices()
String
getMessage()
Automatically appends the index to the message.void
setIndices(List<Object> indices)
String
toIndexString()
Reverses the order of the elements ingetIndices()
and returns a formatted string that is the index the user would add.-
Methods inherited from class org.qdl_lang.exceptions.QDLExceptionWithTrace
getScriptName, getScriptStack, getStatement, hasScriptStack, hasStatement, isScript, setScript, setScriptName, setScriptStack, setStatement, stackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
toIndexString
public String toIndexString()
Reverses the order of the elements ingetIndices()
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 classThrowable
- Returns:
-
-