org.scalafmt.interfaces.PositionException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalafmt-interfaces Show documentation
Show all versions of scalafmt-interfaces Show documentation
Dependency-free, pure Java public interfaces to integrate with Scalafmt through a build tool or editor plugin.
package org.scalafmt.interfaces;
import java.nio.file.Path;
/**
* An exception that happened at a position in a source file such as a parse error.
*/
abstract public class PositionException extends Exception {
public PositionException(String message, Throwable cause) {
super(message, cause);
}
@Override
public synchronized Throwable fillInStackTrace() {
return this;
}
/**
* @return The file where the error occurred.
*/
public abstract Path file();
/**
* @return The text contents of the file being formatted.
*/
public abstract String code();
/**
* @return The fully formatted error message including line content and caret.
*/
public abstract String longMessage();
/**
* @return Only the error message itself without line content and caret.
*/
public abstract String shortMessage();
public abstract int startLine();
public abstract int startCharacter();
public abstract int endLine();
public abstract int endCharacter();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy