📄 validationexception.java
字号:
/* @LICENSE_COPYRIGHT@ */package net.sf.irunninglog.validation;import java.util.Collections;import java.util.List;/** * Exception to be thrown when a validation error occurs. This exception * contains a list of <code>ValidationError</code>s that can be accessed * via the <code>getErrors</code> method. * * @author <a href="mailto:allan_e_lewis@yahoo.com">Allan Lewis</a> * @version $Revision: 1.1.1.1 $ $Date: 2005/06/23 01:49:04 $ * @since iRunningLog 1.0 * @see ValidationError */public final class ValidationException extends Exception { /** List of errors associated with this exception. */ private List mErrors; /** * Create a new exception with a specified list of errors. * * @param errors The list of errors to be contained in this exception. * Each item in the list should be a * <code>ValidationError</code> instance. * @see ValidationError */ public ValidationException(List errors) { this(errors, "Error(s) occurred during validation."); } /** * Create a new exception with a specified list of errors and a specified * detail message. * * @param errors The list of errors to be contained in this exception. * Each item in the list should be a * <code>ValidationError</code> instance * @param message The detail message for the exception * @see ValidationError */ public ValidationException(List errors, String message) { this(errors, message, null); } /** * Create a new exception with a specified list of errors and a specified * detail message. * * @param errors The list of errors to be contained in this exception. * Each item in the list should be a * <code>ValidationError</code> instance * @param message The detail message for the exception * @param cause The exception that caused this exception * @see ValidationError */ public ValidationException(List errors, String message, Throwable cause) { super(message, cause); mErrors = errors; } /** * Get the list of errors contained within this exception. * * @return An (unmodifiable) list of errors contained within this * exception. Each item in the list will be a * <code>ValidationError</code> instance. */ public List getErrors() { return Collections.unmodifiableList(mErrors); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -