1 /* 2 Licensed under the Apache License, Version 2.0 (the "License"); 3 you may not use this file except in compliance with the License. 4 You may obtain a copy of the License at 5 6 http://www.apache.org/licenses/LICENSE-2.0 7 8 Unless required by applicable law or agreed to in writing, software 9 distributed under the License is distributed on an "AS IS" BASIS, 10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 See the License for the specific language governing permissions and 12 limitations under the License. 13 */ 14 package uk.nhs.interoperability.capabilities; 15 16 /** 17 * An exception to report any errors writing audit entries 18 * for instance insufficient information to create the audit 19 * entry, DB connectivity or file I/O issues. 20 * 21 * @author Michael Odling-Smee 22 * @author Nicholas Jones 23 * @since version 0.1 24 */ 25 public class AuditException extends Exception { 26 27 private static final long serialVersionUID = 8891576465479815175L; 28 29 /** 30 * Creates an AuditException with any relevant diagnostic 31 * information about the error - such as the likely cause - 32 * for instance insufficient information to write an audit 33 * record 34 * 35 * @param message The diagnostic message about the 36 * the error condition 37 */ 38 public AuditException(String message) { 39 super(message); 40 } 41 42 /** 43 * Creates an AuditException that wraps an underlying 44 * <code>Throwable</code> which has been encountered 45 * when try to write the audit record 46 * 47 * @param cause The <code>Throwable</code> containing 48 * the root cause for the AuditException 49 */ 50 public AuditException(Throwable cause) { 51 super(cause); 52 } 53 54 /** 55 * Creates an AuditException that wraps an underlying 56 * <code>Throwable</code> which has been encountered 57 * when try to write the audit record as well as any 58 * additional diagnostic information about the error 59 * 60 * @param message The diagnostic message about the 61 * the error condition 62 * @param cause The <code>Throwable</code> containing 63 * the root cause for the AuditException 64 */ 65 public AuditException(String message, Throwable cause) { 66 super(message, cause); 67 } 68 69 }