1 /* 2 * Copyright 2008 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.ole.module.purap.exception; 17 18 /** 19 * Exception that is thrown when a piece of the <code>ItemParser</code> fails. 20 * 21 * @see org.kuali.ole.module.purap.util.ItemParser 22 */ 23 public class ItemParserException extends RuntimeException { 24 25 private String errorKey; 26 private String[] errorParameters; 27 28 /** 29 * Constructs an ItemParserException instance. 30 * 31 * @param message error message 32 */ 33 public ItemParserException(String message) { 34 super(message); 35 } 36 37 /** 38 * Constructs an ItemParserException instance. 39 * 40 * @param message error message 41 * @param errorKey key to an error message 42 * @param errorParameters error message parameters 43 */ 44 public ItemParserException(String message, String errorKey, String... errorParameters) { 45 super(message); 46 this.errorKey = errorKey; 47 this.errorParameters = errorParameters; 48 } 49 50 /** 51 * Gets the errorKey attribute. 52 * 53 * @return Returns the errorKey. 54 */ 55 public String getErrorKey() { 56 return errorKey; 57 } 58 59 /** 60 * Gets the errorParameters attribute. 61 * 62 * @return Returns the errorParameters. 63 */ 64 public String[] getErrorParameters() { 65 return errorParameters; 66 } 67 68 }