info.bioinfweb.treegraph.document.io.newick
Class NewickException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
info.bioinfweb.treegraph.document.io.newick.NewickException
- All Implemented Interfaces:
- Serializable
public class NewickException
- extends RuntimeException
An instance of this exception is thrown if an input newick string contains a syntactical error and
cannot be read.
- Author:
- Ben Stöver
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
CHAR_COUNT_BEFORE
public static final int CHAR_COUNT_BEFORE
- See Also:
- Constant Field Values
CHAR_COUNT_AFTER
public static final int CHAR_COUNT_AFTER
- See Also:
- Constant Field Values
position
private int position
sourceBefore
private String sourceBefore
sourceAfter
private String sourceAfter
NewickException
public NewickException(int pos,
String source,
String msg)
NewickException
public NewickException(int pos,
String source,
TokenType expected,
TokenType found)
NewickException
public NewickException(NewickToken token,
String source)
storePositionInfo
private void storePositionInfo(int pos,
String source)
getUnterminatedNameException
public static NewickException getUnterminatedNameException(int start,
String source)
getUnterminatedCommentException
public static NewickException getUnterminatedCommentException(int start,
String source)
getPosition
public int getPosition()
- The position of the error in the newick string.
- Returns:
getSourceAfter
public String getSourceAfter()
- Returns a part of the newick source starting at the error position.
- Returns:
getSourceBefore
public String getSourceBefore()
- Returns a part of the newick source ending before the error position.
- Returns: