Source Code Cross Referenced for SAXException.java in  » Database-DBMS » Quadcap-Embeddable-Database » org » xml » sax » 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 » Database DBMS » Quadcap Embeddable Database » org.xml.sax 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright 2000 - 2001 Quadcap Software.  All rights reserved.
002:         *
003:         * This software is distributed under the Quadcap Free Software License.
004:         * This software may be used or modified for any purpose, personal or
005:         * commercial.  Open Source redistributions are permitted.  Commercial
006:         * redistribution of larger works derived from, or works which bundle
007:         * this software requires a "Commercial Redistribution License"; see
008:         * http://www.quadcap.com/purchase.
009:         *
010:         * Redistributions qualify as "Open Source" under  one of the following terms:
011:         *   
012:         *    Redistributions are made at no charge beyond the reasonable cost of
013:         *    materials and delivery.
014:         *
015:         *    Redistributions are accompanied by a copy of the Source Code or by an
016:         *    irrevocable offer to provide a copy of the Source Code for up to three
017:         *    years at the cost of materials and delivery.  Such redistributions
018:         *    must allow further use, modification, and redistribution of the Source
019:         *    Code under substantially the same terms as this license.
020:         *
021:         * Redistributions of source code must retain the copyright notices as they
022:         * appear in each source code file, these license terms, and the
023:         * disclaimer/limitation of liability set forth as paragraph 6 below.
024:         *
025:         * Redistributions in binary form must reproduce this Copyright Notice,
026:         * these license terms, and the disclaimer/limitation of liability set
027:         * forth as paragraph 6 below, in the documentation and/or other materials
028:         * provided with the distribution.
029:         *
030:         * The Software is provided on an "AS IS" basis.  No warranty is
031:         * provided that the Software is free of defects, or fit for a
032:         * particular purpose.  
033:         *
034:         * Limitation of Liability. Quadcap Software shall not be liable
035:         * for any damages suffered by the Licensee or any third party resulting
036:         * from use of the Software.
037:         */
038:
039:        // SAX exception class.
040:        // No warranty; no copyright -- use this as you will.
041:        // $Id: SAXException.java,v 1.3 2001/01/06 06:11:03 stan Exp $
042:        package org.xml.sax;
043:
044:        /**
045:         * Encapsulate a general SAX error or warning.
046:         *
047:         * <p>This class can contain basic error or warning information from
048:         * either the XML parser or the application: a parser writer or
049:         * application writer can subclass it to provide additional
050:         * functionality.  SAX handlers may throw this exception or
051:         * any exception subclassed from it.</p>
052:         *
053:         * <p>If the application needs to pass through other types of
054:         * exceptions, it must wrap those exceptions in a SAXException
055:         * or an exception derived from a SAXException.</p>
056:         *
057:         * <p>If the parser or application needs to include information about a
058:         * specific location in an XML document, it should use the
059:         * SAXParseException subclass.</p>
060:         *
061:         * @author David Megginson (ak117@freenet.carleton.ca)
062:         * @version 1.0
063:         * @see org.xml.sax.SAXParseException
064:         */
065:        public class SAXException extends Exception {
066:
067:            /**
068:             * Create a new SAXException.
069:             *
070:             * @param message The error or warning message.
071:             * @see org.xml.sax.Parser#setLocale
072:             */
073:            public SAXException(String message) {
074:                super ();
075:                this .message = message;
076:                this .exception = null;
077:            }
078:
079:            /**
080:             * Create a new SAXException wrapping an existing exception.
081:             *
082:             * <p>The existing exception will be embedded in the new
083:             * one, and its message will become the default message for
084:             * the SAXException.</p>
085:             *
086:             * @param e The exception to be wrapped in a SAXException.
087:             */
088:            public SAXException(Exception e) {
089:                super ();
090:                this .message = null;
091:                this .exception = e;
092:            }
093:
094:            /**
095:             * Create a new SAXException from an existing exception.
096:             *
097:             * <p>The existing exception will be embedded in the new
098:             * one, but the new exception will have its own message.</p>
099:             *
100:             * @param message The detail message.
101:             * @param e The exception to be wrapped in a SAXException.
102:             * @see org.xml.sax.Parser#setLocale
103:             */
104:            public SAXException(String message, Exception e) {
105:                super ();
106:                this .message = message;
107:                this .exception = e;
108:            }
109:
110:            /**
111:             * Return a detail message for this exception.
112:             *
113:             * <p>If there is a embedded exception, and if the SAXException
114:             * has no detail message of its own, this method will return
115:             * the detail message from the embedded exception.</p>
116:             *
117:             * @return The error or warning message.
118:             * @see org.xml.sax.Parser#setLocale
119:             */
120:            public String getMessage() {
121:                if (message == null && exception != null) {
122:                    return exception.getMessage();
123:                } else {
124:                    return this .message;
125:                }
126:            }
127:
128:            /**
129:             * Return the embedded exception, if any.
130:             *
131:             * @return The embedded exception, or null if there is none.
132:             */
133:            public Exception getException() {
134:                return exception;
135:            }
136:
137:            /**
138:             * Convert this exception to a string.
139:             *
140:             * @return A string version of this exception.
141:             */
142:            public String toString() {
143:                return getMessage();
144:            }
145:
146:            //////////////////////////////////////////////////////////////////////
147:            // Internal state.
148:            //////////////////////////////////////////////////////////////////////
149:
150:            private String message;
151:            private Exception exception;
152:
153:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.