Source Code Cross Referenced for RootError.java in  » Workflow-Engines » shark » org » enhydra » shark » api » 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 » Workflow Engines » shark » org.enhydra.shark.api 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.enhydra.shark.api;
002:
003:        import java.io.PrintStream;
004:        import java.io.PrintWriter;
005:
006:        /**
007:         * This Error allows implementation of chain exceptions, and this implementation
008:         * takes care if JDK1.3 or JDK1.4 is used.
009:         *
010:         * @author Vladimir Puskas
011:         * @author Sasa Bojanic
012:         */
013:        public class RootError extends Error {
014:
015:            private Throwable cause;
016:
017:            /**
018:             * Constructs a new exception with null as its detail message.
019:             *
020:             */
021:            public RootError() {
022:                super ();
023:            }
024:
025:            /**
026:             * Constructs a new exception with the specified detail message.
027:             *
028:             * @param message the detail message.
029:             *
030:             */
031:            public RootError(String message) {
032:                super (message);
033:            }
034:
035:            /**
036:             * Constructs a new exception with the specified cause.
037:             *
038:             * @param  t the cause. A null value is permitted, and indicates that
039:             * the cause is nonexistent or unknown.
040:             *
041:             */
042:            public RootError(Throwable t) {
043:                super (t.getMessage());
044:                try {
045:                    initCause(t);
046:                } catch (Throwable e) {
047:                }
048:            }
049:
050:            /**
051:             * Constructs a new exception with the specified detail message and cause.
052:             *
053:             * @param message the detail message.
054:             * @param  t the cause. A null value is permitted, and indicates that
055:             * the cause is nonexistent or unknown.
056:             */
057:            public RootError(String message, Throwable t) {
058:                super (message);
059:                try {
060:                    initCause(t);
061:                } catch (Throwable e) {
062:                }
063:            }
064:
065:            /**
066:             * Initializes the cause of this exception to the specified value.
067:             *
068:             * @param t the cause.
069:             *
070:             * @return a reference to this instance.
071:             *
072:             * @exception   IllegalArgumentException
073:             * @exception   IllegalStateException
074:             */
075:            public Throwable initCause(Throwable t)
076:                    throws IllegalArgumentException, IllegalStateException {
077:                cause = t;
078:                return this ;
079:            }
080:
081:            /**
082:             * Returns the cause of this exception.
083:             *
084:             * @return   a cause for this exception if any, null otherwise
085:             *
086:             */
087:            public Throwable getCause() {
088:                return cause;
089:            }
090:
091:            /**
092:             * Method printStackTrace prints the stack trace to the <i>ps</i> PrintStream.
093:             *
094:             * @param ps PrintStream used for the output.
095:             */
096:            public void printStackTrace(PrintStream ps) {
097:                if (null != cause) {
098:                    cause.printStackTrace(ps);
099:                }
100:                super .printStackTrace(ps);
101:            }
102:
103:            /**
104:             * Method printStackTrace prints the stack trace to the <i>pw</i> PrintWriter.
105:             *
106:             * @param pw PrintWriter used for the output.
107:             */
108:            public void printStackTrace(PrintWriter pw) {
109:                if (null != cause) {
110:                    cause.printStackTrace(pw);
111:                }
112:                super .printStackTrace(pw);
113:            }
114:
115:            /**
116:             * Method printStackTrace prints the stack trace to the standard error stream.
117:             */
118:            public void printStackTrace() {
119:                printStackTrace(System.err);
120:            }
121:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.