scannerexception.java

来自「是有关解释器的.用JAVA编写.可以解释一般的JAVA程序.」· Java 代码 · 共 40 行

JAVA
40
字号
/** Thrown when an I/O error occured. */
public class ScannerException extends Exception {
    private int pos;

    private int line;

    private String text;

    /**
     * Creates a new instance of the exception.
     * 
     * @param l
     *            the row where the error occured
     * @param p
     *            the column where the error occured
     * @param t
     *            an error description
     */
    ScannerException(int l, int p, String t) {
        super("ScannerException <" + t + "> at line " + l + " and position "
                + p + ".");

        line = l;
        pos = p;
        text = t;
    }

    int line() {
        return line;
    }

    int pos() {
        return pos;
    }

    String text() {
        return text;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?