Source Code Cross Referenced for ConfigException.java in  » J2EE » Enhydra-Application-Framework » com » lutris » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Enhydra Application Framework » com.lutris.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Enhydra Java Application Server Project
003:         * 
004:         * The contents of this file are subject to the Enhydra Public License
005:         * Version 1.1 (the "License"); you may not use this file except in
006:         * compliance with the License. You may obtain a copy of the License on
007:         * the Enhydra web site ( http://www.enhydra.org/ ).
008:         * 
009:         * Software distributed under the License is distributed on an "AS IS"
010:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 
011:         * the License for the specific terms governing rights and limitations
012:         * under the License.
013:         * 
014:         * The Initial Developer of the Enhydra Application Server is Lutris
015:         * Technologies, Inc. The Enhydra Application Server and portions created
016:         * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
017:         * All Rights Reserved.
018:         * 
019:         * Contributor(s):
020:         * 
021:         * $Id: ConfigException.java,v 1.2 2006-06-15 13:40:47 sinisa Exp $
022:         */
023:
024:        package com.lutris.util;
025:
026:        /**
027:         * Exception class thrown by class <code>Config</code>.  If a syntax
028:         * error is found in the configuration input stream, or if a component
029:         * expects a data format for which a configuration element cannot be
030:         * converted, then this exception is thrown to indicate the error.
031:         * 
032:         * @see		Config
033:         * @version	$Revision: 1.2 $
034:         * @author	John Marco
035:         * @since	Soda1.0
036:         */
037:        public class ConfigException extends KeywordValueException {
038:            /**
039:             * The <code>reason</code> field may contain this value to indicate
040:             * that the cause of the current exception is unknown.
041:             * 
042:             * @see ConfigException#reason
043:             */
044:            public static final int UNKNOWN = 0;
045:
046:            /**
047:             * The <code>reason</code> field may contain this value to indicate
048:             * that a syntax error in the configuration input file or stream
049:             * caused this exception.
050:             * 
051:             * @see ConfigException#reason
052:             */
053:            public static final int NOT_FOUND = 1;
054:
055:            /**
056:             * The <code>reason</code> field may contain this value to indicate
057:             * that a syntax error in the configuration input file or stream
058:             * caused this exception.
059:             * 
060:             * @see ConfigException#reason
061:             */
062:            public static final int SYNTAX = 2;
063:
064:            /**
065:             * The <code>reason</code> field may contain this value to indicate
066:             * that a component expects a different number of elements than
067:             * are provided in the configuration file for a particular key.
068:             * 
069:             * @see ConfigException#reason
070:             */
071:            public static final int COUNT = 3;
072:
073:            /**
074:             * The <code>reason</code> field may contain this value to indicate
075:             * that a configuration element could not be converted from its
076:             * internal string form to the requested type.
077:             * 
078:             * @see ConfigException#reason
079:             */
080:            public static final int FORMAT = 4;
081:
082:            /**
083:             * Internal constant to indicate the highest valid <code>reason</code>
084:             * code.
085:             * 
086:             * @see ConfigException#reason
087:             */
088:            private static final int MAX_REASON = 4;
089:
090:            /**
091:             * Indicates the cause (if known) of the current exception.
092:             * 
093:             * @see ConfigException#UNKNOWN
094:             * @see ConfigException#SYNTAX
095:             * @see ConfigException#COUNT
096:             * @see ConfigException#FORMAT
097:             */
098:            public int reason;
099:
100:            /**
101:             * Creates a new ConfigException object with no informational string
102:             * and a <code>reason</code> field of <code>UNKNOWN</code>.
103:             * 
104:             * @see ConfigException#reason
105:             */
106:            public ConfigException() {
107:                super ("Unknown reason");
108:                reason = UNKNOWN;
109:            }
110:
111:            /**
112:             * Creates a new ConfigException object with the specified informational
113:             * string and a <code>reason</code> field of <code>UNKNOWN</code>.
114:             * 
115:             * @param s Informational string to store in the exception object.
116:             * 
117:             * @see ConfigException#reason
118:             */
119:            public ConfigException(String s) {
120:                super (s);
121:                reason = UNKNOWN;
122:            }
123:
124:            /**
125:             * Constructs a new exception with the specified cause.
126:             *
127:             * @param cause The cause (which is saved for later retrieval by the 
128:             * Throwable.getCause() method). 
129:             * A null value is permitted, and indicates that the cause is 
130:             * nonexistent or unknown.
131:             */
132:            public ConfigException(Throwable cause) {
133:                super (cause);
134:            }
135:
136:            /**
137:             * Constructs a new exception with the specified cause and a detail message.
138:             *
139:             * @param msg A detailed message describing the expection.
140:             * @param cause The cause (which is saved for later retrieval by the 
141:             * Throwable.getCause() method). 
142:             * A null value is permitted, and indicates that the cause is 
143:             * nonexistent or unknown.
144:             */
145:            public ConfigException(String msg, Throwable cause) {
146:                super (msg, cause);
147:            }
148:
149:            /**
150:             * Creates a new ConfigException object with the specified informational
151:             * string and the specified <code>reason</code> field.
152:             * 
153:             * @param s Informational string to store in the exception object.
154:             * @param r Reason code to store in the <code>reason</code> field.
155:             * 
156:             * @see ConfigException#reason
157:             */
158:            public ConfigException(int r, String s) {
159:                super (s);
160:                if ((r < 0) || (r > MAX_REASON))
161:                    reason = UNKNOWN;
162:                else
163:                    reason = r;
164:            }
165:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.