Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`static int` | `CHAR_COUNT_AFTER`
`static int` | `CHAR_COUNT_BEFORE`
`private int` | `position`
`private static long` | `serialVersionUID`
`private String` | `sourceAfter`
`private String` | `sourceBefore`

Constructor Summary
`NewickException(int pos, String source, String msg)`
`NewickException(int pos, String source, TokenType expected, TokenType found)`
`NewickException(NewickToken token, String source)`

Method Summary
`int` | `getPosition()` The position of the error in the newick string.
`String` | `getSourceAfter()` Returns a part of the newick source starting at the error position.
`String` | `getSourceBefore()` Returns a part of the newick source ending before the error position.
`static NewickException` | `getUnterminatedCommentException(int start, String source)`
`static NewickException` | `getUnterminatedNameException(int start, String source)`
`private void` | `storePositionInfo(int pos, String source)`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### 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)

Method Detail

### 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:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD