⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 validationexception.java

📁 A Java web application, based on Struts and Hibernate, that serves as an online running log. Users m
💻 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 + -