1 /* 2 * Copyright 2007-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.rice.core.api.exception; 17 18 /** 19 * This is a default exception class that others inherit. When an exception is thrown, 20 * the exception handler looks for an instance of this class and processes as Kuali 21 * exception. Otherwise, generic system exception is processed. 22 * 23 * @author Kuali Rice Team (rice.collab@kuali.org) 24 * 25 */ 26 27 public abstract class KualiException extends RuntimeException { 28 29 private static final long serialVersionUID = 2395877766757834813L; 30 private boolean hideIncidentReport = false; 31 32 /** 33 * This constructs an instance of java.lang.RuntimeException 34 * 35 * @param message 36 */ 37 public KualiException(String message) { 38 super(message); 39 } 40 41 /** 42 * This constructs an instance of java.lang.RuntimeException 43 * 44 * @param message 45 * @param hideIncidentReport 46 */ 47 public KualiException(String message, boolean hideIncidentReport){ 48 super(message); 49 this.hideIncidentReport = hideIncidentReport; 50 } 51 52 /** 53 * This constructs an instance of java.lang.RuntimeException 54 * 55 * @param message 56 * @param t 57 */ 58 public KualiException(String message, Throwable t) { 59 super(message, t); 60 } 61 62 /** 63 * This constructs an instance of java.lang.RuntimeException 64 * 65 * @param t 66 */ 67 public KualiException(Throwable t) { 68 super(t); 69 } 70 71 /** 72 * @param hideIncidentReport the hideIncidentReport to set 73 */ 74 public void setHideIncidentReport(boolean hideIncidentReport) { 75 this.hideIncidentReport = hideIncidentReport; 76 } 77 78 /** 79 * @return the hideIncidentReport 80 */ 81 public boolean isHideIncidentReport() { 82 return this.hideIncidentReport; 83 } 84 85 86 87 88 }