/*
 * JaamSim Discrete Event Simulation
 * Copyright (C) 2002-2011 Ausenco Engineering Canada Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jaamsim.input;

/**
 * Custom exception thrown when an error due to bad input is encountered.
 */
public class InputErrorException extends RuntimeException {
	public InputErrorException(String format, Object... args) {
		super(String.format(format, args));
	}
}

@@ -92,16 +92,60 @@
 da Inc.%0A
+ * Copyright (C) 2016 JaamSim Software Inc.%0A
  *%0A * Li
@@ -868,16 +868,178 @@
 ption %7B%0A
+%0A%09public String source;%0A%09public int position;%0A%0A%09public InputErrorException(int pos, String src, String msg) %7B%0A%09%09super(msg);%0A%09%09source = src;%0A%09%09position = pos;%0A%09%7D%0A%0A
 %09public 
@@ -1093,22 +1093,29 @@
 gs) %7B%0A%09%09
-super(
+this(-1, %22%22, 
 String.f
@@ -1139,10 +1139,98 @@
 s));%0A%09%7D%0A
+%0A%09public InputErrorException(ExpError e) %7B%0A%09%09this(e.pos, e.source, e.getMessage());%0A%09%7D%0A%0A
 %7D%0A

store expression error data in InputErrorException