Package com.iizix.text
Class KStringParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.iizix.text.KStringException
com.iizix.text.KStringParseException
- All Implemented Interfaces:
Serializable
Exception class used for KString parsing errors.
- Author:
- Christopher Mindus
- See Also:
Constructor Summary
ConstructorDescriptionKStringParseException
(String message, String inputString, int parsePosition) Constructs a KString parse exception.Method Summary
Modifier and TypeMethodDescriptionFormats a string that can be used by e.g.Gets the input string that caused the error.int
Gets the parsing position where the error occurred.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Details
KStringParseException
Constructs a KString parse exception.- Parameters:
message
- The message string.inputString
- The HTML input string.parsePosition
- The error position in the input string.
Method Details
getParsePosition
public int getParsePosition()Gets the parsing position where the error occurred.- Returns:
- The position in the input string that caused the error.
getInputString
Gets the input string that caused the error.- Returns:
- The input string for the error.
getFixedCharacterOutput
Formats a string that can be used by e.g. System.out to display the parse error. The output consists of two lines separated with the system line separator where the first line is the input string, the second line the indication to where the error is located.- Returns:
- A fixed format string consisting of two lines.