/*
 * Java GPX Library (@__identifier__@).
 *
 * 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 io.jenetics.jpx.format;

/**
 * This exception is thrown when the parsing of a location pattern string fails.
 *
 * @see LocationFormatter
 *
 * @version 2.2
 * @since 2.2
 */
public class ParseException extends FormatterException {
	private static final long serialVersionUID = 1;

	/**
	 * Create a new parse exception with the given parameters.
	 *
	 * @param message the error message
	 * @param in the erroneous location string
	 * @param position the error position
	 */
	ParseException(
		final String message,
		final CharSequence in,
		final int position
	) {
		super(message + " at position " + position + " in " + in);
	}

}

@@ -632,16 +632,56 @@
 ormat;%0A%0A
+import static java.lang.String.format;%0A%0A
 /**%0A * T
@@ -1228,19 +1228,18 @@
 per(
-message + %22
+format(%22%25s
  at 
@@ -1251,35 +1251,45 @@
 ion 
-%22 + position + %22 in %22 +
+%25d in '%25s'.%22, message, position,
  in)
+)
 ;%0A%09%7D

Improve error message.