KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > tool > common > DataValidationException


1
2 /*
3  * Enhydra Java Application Server Project
4  *
5  * The contents of this file are subject to the Enhydra Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License on
8  * the Enhydra web site ( http://www.enhydra.org/ ).
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific terms governing rights and limitations
13  * under the License.
14  *
15  * The Initial Developer of the Enhydra Application Server is Lutris
16  * Technologies, Inc. The Enhydra Application Server and portions created
17  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
18  * All Rights Reserved.
19  *
20  * Contributor(s):
21  * Paul Mahar
22  *
23  */

24 package org.enhydra.tool.common;
25 //
26

27 /**
28  * The DataValidationException thrown when validating panel entriesvalues.
29  */

30 public class DataValidationException extends ToolException {
31     transient private String JavaDoc validationMsg = new String JavaDoc();
32
33     /**
34      * Create a GeneratorException with a specified error message.
35      *
36      * @param message
37      * Message providing information on the nature of the exception.
38      */

39     public DataValidationException(String JavaDoc message) {
40         super(message);
41         validationMsg = message;
42     }
43
44     /**
45      * Create a ValidationException linked to a parent exception.
46      *
47      * @param chain
48      * Parent exception to include in stack trace.
49      * @param message
50      * Message providing information on the nature of the exception.
51      */

52     public DataValidationException(Throwable JavaDoc chain, String JavaDoc message) {
53         super(chain, message);
54         validationMsg = message;
55     }
56
57     /**
58      * Get the message of this exception without any other chain
59      * member messages.
60      *
61      * @return
62      * A single exception message.
63      */

64     public String JavaDoc getValidationMessage() {
65         return validationMsg;
66     }
67
68 }
69
Popular Tags