001/* 002 * Copyright 2002-2017 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.expression; 018 019import org.springframework.lang.Nullable; 020 021/** 022 * Represent an exception that occurs during expression parsing. 023 * 024 * @author Andy Clement 025 * @since 3.0 026 */ 027@SuppressWarnings("serial") 028public class ParseException extends ExpressionException { 029 030 /** 031 * Create a new expression parsing exception. 032 * @param expressionString the expression string that could not be parsed 033 * @param position the position in the expression string where the problem occurred 034 * @param message description of the problem that occurred 035 */ 036 public ParseException(@Nullable String expressionString, int position, String message) { 037 super(expressionString, position, message); 038 } 039 040 /** 041 * Create a new expression parsing exception. 042 * @param position the position in the expression string where the problem occurred 043 * @param message description of the problem that occurred 044 * @param cause the underlying cause of this exception 045 */ 046 public ParseException(int position, String message, Throwable cause) { 047 super(position, message, cause); 048 } 049 050 /** 051 * Create a new expression parsing exception. 052 * @param position the position in the expression string where the problem occurred 053 * @param message description of the problem that occurred 054 */ 055 public ParseException(int position, String message) { 056 super(position, message); 057 } 058 059}