Search in sources :

Example 1 with DuplicationsException

use of org.sonar.duplications.DuplicationsException in project sonarqube by SonarSource.

the class TokenChunker method chunk.

public TokenQueue chunk(Reader reader) {
    CodeReader code = new CodeReader(reader);
    TokenQueue queue = new TokenQueue();
    try {
        channelDispatcher.consume(code, queue);
        return queue;
    } catch (Exception e) {
        throw new DuplicationsException("Unable to lex source code at line : " + code.getLinePosition() + " and column : " + code.getColumnPosition(), e);
    }
}
Also used : DuplicationsException(org.sonar.duplications.DuplicationsException) CodeReader(org.sonar.channel.CodeReader) DuplicationsException(org.sonar.duplications.DuplicationsException)

Aggregations

CodeReader (org.sonar.channel.CodeReader)1 DuplicationsException (org.sonar.duplications.DuplicationsException)1