1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.apache.maven.api.services; 20 21 import java.io.Serial; 22 23 import org.apache.maven.api.annotations.Experimental; 24 25 /** 26 * Exception thrown by {@link Interpolator} implementations when an error occurs during interpolation. 27 * This can include syntax errors in variable placeholders or recursive variable references. 28 * 29 * @since 4.0.0 30 */ 31 @Experimental 32 public class InterpolatorException extends MavenException { 33 34 @Serial 35 private static final long serialVersionUID = -1219149033636851813L; 36 37 /** 38 * Constructs a new InterpolatorException with {@code null} as its 39 * detail message. The cause is not initialized, and may subsequently be 40 * initialized by a call to {@link #initCause}. 41 */ 42 public InterpolatorException() {} 43 44 /** 45 * Constructs a new InterpolatorException with the specified detail message. 46 * The cause is not initialized, and may subsequently be initialized by 47 * a call to {@link #initCause}. 48 * 49 * @param message the detail message. The detail message is saved for 50 * later retrieval by the {@link #getMessage()} method. 51 */ 52 public InterpolatorException(String message) { 53 super(message); 54 } 55 56 /** 57 * Constructs a new InterpolatorException with the specified detail message and cause. 58 * 59 * <p>Note that the detail message associated with {@code cause} is <i>not</i> 60 * automatically incorporated in this exception's detail message.</p> 61 * 62 * @param message the detail message (which is saved for later retrieval 63 * by the {@link #getMessage()} method). 64 * @param cause the cause (which is saved for later retrieval by the 65 * {@link #getCause()} method). A {@code null} value is 66 * permitted, and indicates that the cause is nonexistent or unknown. 67 */ 68 public InterpolatorException(String message, Throwable cause) { 69 super(message, cause); 70 } 71 }