1 package cz.cuni.amis.pogamut.sposh.exceptions; 2 3 /** 4 * This exception is thrown when some call has an argument with value of 5 * parameter and the parameter is missing. 6 * 7 * E.g. (AP vars($a=1) ( do-something($b))), but $b is not one of parameters of 8 * node AP. 9 * 10 * @author Honza 11 */ 12 public class MissingParameterException extends Exception { 13 14 /** 15 * Name of missing parameter 16 */ 17 private final String parameterName; 18 19 /** 20 * Create new exception about missing parameter. 21 * 22 * @param parameterName Name of missing parameter. 23 */ 24 public MissingParameterException(String parameterName) { 25 super("Paramater \"" + parameterName + "\" is required, but is not present."); 26 this.parameterName = parameterName; 27 } 28 29 public String getParameterName() { 30 return parameterName; 31 } 32 }