Code example for Locator

Methods: getColumnNumber, getLineNumber

0
            super(message);
        } 
 
        public PresetParsingException rememberLocation(Locator locator) {
            if (locator == null) return this;
            this.columnNumber = locator.getColumnNumber();
            this.lineNumber = locator.getLineNumber();
            return this;
        } 
 
        @Override 
        public String getMessage() {
            String msg = super.getMessage();
            if (lineNumber == 0 && columnNumber == 0)
                return msg;
            if (msg == null) {
                msg = getClass().getName();
            } 
            msg = msg + " " + tr("(at line {0}, column {1})", lineNumber, columnNumber);
            return msg;
        }