Source Code Cross Referenced for BossaException.java in  » Workflow-Engines » Bossa » com » bigbross » bossa » 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 » Bossa » com.bigbross.bossa 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Bossa Workflow System
003:         *
004:         * $Id: BossaException.java,v 1.3 2004/01/15 22:13:32 gdvieira Exp $
005:         *
006:         * Copyright (C) 2003,2004 OpenBR Sistemas S/C Ltda.
007:         *
008:         * This file is part of Bossa.
009:         *
010:         * Bossa is free software; you can redistribute it and/or modify it
011:         * under the terms of version 2 of the GNU General Public License as
012:         * published by the Free Software Foundation.
013:         *
014:         * This program is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:         * General Public License for more details.
018:         *
019:         * You should have received a copy of the GNU General Public
020:         * License along with this program; if not, write to the
021:         * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
022:         * Boston, MA 02111-1307, USA.
023:         */
024:
025:        package com.bigbross.bossa;
026:
027:        import java.io.PrintStream;
028:        import java.io.PrintWriter;
029:
030:        /**
031:         * This class represents an exception of the Bossa system. <p>
032:         * 
033:         * This exception also implements the behaviour of a nested (or chained)
034:         * exception, such as the <code>Throwable</code> class in Java 1.4.
035:         * This is an exception which may contain another throwable which
036:         * caused it to get thrown. <p>
037:         *
038:         * @author <a href="http://www.bigbross.com">BigBross Team</a>
039:         */
040:        public class BossaException extends Exception {
041:
042:            private Throwable cause;
043:
044:            private boolean causeRead;
045:
046:            /**
047:             * Constructs a new <code>BossaException</code> object with
048:             * <code>null</code> as its detail message. <p>
049:             */
050:            public BossaException() {
051:                super ();
052:                this .cause = null;
053:            }
054:
055:            /**
056:             * Constructs a new <code>BossaException</code> object with the
057:             * specified detail message. <p>
058:             *
059:             * @param message the detail message.
060:             */
061:            public BossaException(String message) {
062:                super (message);
063:                this .cause = null;
064:            }
065:
066:            /**
067:             * Constructs a new <code>BossaException</code> object with the
068:             * specified detail message and cause. <p>
069:             *
070:             * @param message the detail message.
071:             * @param cause the cause.
072:             */
073:            public BossaException(String message, Throwable cause) {
074:                super (message);
075:                this .cause = cause;
076:            }
077:
078:            /**
079:             * Constructs a new <code>BossaException</code> object with the
080:             * specified cause and a detail message of
081:             * <code>cause.toString()</code>. <p>
082:             *
083:             * @param cause the cause.
084:             */
085:            public BossaException(Throwable cause) {
086:                super (cause.toString());
087:                this .cause = cause;
088:            }
089:
090:            /**
091:             * Returns the cause of this <code>BossaException</code>. The
092:             * cause is the throwable that caused this
093:             * <code>BossaException</code> object to get thrown. <p>
094:             *
095:             * @return the cause.
096:             */
097:            public Throwable getCause() {
098:                this .causeRead = true;
099:                return this .cause;
100:            }
101:
102:            /**
103:             * Prints this <code>BossaException</code> object and its
104:             * backtrace to the standard error stream. <p>
105:             */
106:            public void printStackTrace() {
107:                printStackTrace(System.err);
108:            }
109:
110:            /**
111:             * Prints this <code>BossaException</code> object and its
112:             * backtrace to the specified print stream. <p>
113:             *
114:             * @param ps <code>PrintStream</code> object to use for output.
115:             */
116:            public void printStackTrace(PrintStream ps) {
117:                this .causeRead = false;
118:                super .printStackTrace(ps);
119:                if (cause != null && this .causeRead == false) {
120:                    ps.print("Caused by: ");
121:                    cause.printStackTrace(ps);
122:                }
123:            }
124:
125:            /**
126:             * Prints this <code>BossaException</code> object and its
127:             * backtrace to the specified print writer. <p>
128:             *
129:             * @param pw <code>PrintWriter</code> object to use for output.
130:             */
131:            public void printStackTrace(PrintWriter pw) {
132:                this .causeRead = false;
133:                super .printStackTrace(pw);
134:                if (cause != null && this .causeRead == false) {
135:                    pw.print("Caused by: ");
136:                    cause.printStackTrace(pw);
137:                }
138:            }
139:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.