Package org.apache.sysds.parser
Class ParseException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.lang.RuntimeException
- 
- org.apache.sysds.api.DMLException
- 
- org.apache.sysds.parser.ParseException
 
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class ParseException extends DMLException This exception is thrown when parse issues are encountered.- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.sysds.api.DMLExceptionERROR_MSG_DELIMITER
 
- 
 - 
Constructor SummaryConstructors Constructor Description ParseException()ParseException(String message)ParseException(String message, Exception e)ParseException(List<CustomErrorListener.ParseIssue> parseIssues, String scriptString)This constructor takes a list of parse issues that were generated during script parsing and the original DML/PyDML script String.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Obtain the exception message.List<CustomErrorListener.ParseIssue>getParseIssues()Obtain the list of parse issues that occurred.StringgetScriptString()Obtain the original DML/PyDML script string.booleanhasParseIssues()Does this ParseException contain a list of parse issues?voidsetParseIssues(List<CustomErrorListener.ParseIssue> parseIssues)Set the list of parse issues.voidsetScriptString(String scriptString)Set the original DML/PyDML script string.- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
ParseExceptionpublic ParseException() 
 - 
ParseExceptionpublic ParseException(String message) 
 - 
ParseExceptionpublic ParseException(List<CustomErrorListener.ParseIssue> parseIssues, String scriptString) This constructor takes a list of parse issues that were generated during script parsing and the original DML/PyDML script String.- Parameters:
- parseIssues- List of parse issues (syntax errors, validation errors, and validation warnings) generated during parsing.
- scriptString- The DML/PyDML script String.
 
 
- 
 - 
Method Detail- 
getParseIssuespublic List<CustomErrorListener.ParseIssue> getParseIssues() Obtain the list of parse issues that occurred.- Returns:
- the list of parse issues
 
 - 
setParseIssuespublic void setParseIssues(List<CustomErrorListener.ParseIssue> parseIssues) Set the list of parse issues.- Parameters:
- parseIssues- the list of parse issues
 
 - 
getScriptStringpublic String getScriptString() Obtain the original DML/PyDML script string.- Returns:
- the original DML/PyDML script string
 
 - 
setScriptStringpublic void setScriptString(String scriptString) Set the original DML/PyDML script string.- Parameters:
- scriptString- the original DML/PyDML script string
 
 - 
hasParseIssuespublic boolean hasParseIssues() Does this ParseException contain a list of parse issues?- Returns:
- trueif the list of parse issues exists and is greater than 0,- falseotherwise
 
 - 
getMessagepublic String getMessage() Obtain the exception message. If there is a list of parse issues, these are used to generate the exception message.- Overrides:
- getMessagein class- Throwable
 
 
- 
 
-