001package jmri.jmrit.logixng.util.parser; 002 003/** 004 * Invalid syntax. 005 * 006 * @author Daniel Bergqvist Copyright (C) 2020 007 */ 008public class InvalidSyntaxException extends ParserException { 009 010 private final int _position; 011 012 /** 013 * Constructs an instance of <code>InvalidExpressionException</code> with the specified detail message. 014 * @param msg the detail message. 015 */ 016 public InvalidSyntaxException(String msg) { 017 super(msg); 018 _position = -1; 019 } 020 021 /** 022 * Constructs an instance of <code>InvalidExpressionException</code> with the specified detail message. 023 * @param msg the detail message. 024 * @param position the position 025 */ 026 public InvalidSyntaxException(String msg, int position) { 027 super(msg); 028 _position = position; 029 } 030 031 public int getPosition() { 032 return _position; 033 } 034 035}