Source Code Cross Referenced for TurbineException.java in  » Web-Framework » TURBINE » org » apache » turbine » 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 » Web Framework » TURBINE » org.apache.turbine.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.apache.turbine.util;
002:
003:        /*
004:         * Licensed to the Apache Software Foundation (ASF) under one
005:         * or more contributor license agreements.  See the NOTICE file
006:         * distributed with this work for additional information
007:         * regarding copyright ownership.  The ASF licenses this file
008:         * to you under the Apache License, Version 2.0 (the
009:         * "License"); you may not use this file except in compliance
010:         * with the License.  You may obtain a copy of the License at
011:         *
012:         *   http://www.apache.org/licenses/LICENSE-2.0
013:         *
014:         * Unless required by applicable law or agreed to in writing,
015:         * software distributed under the License is distributed on an
016:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017:         * KIND, either express or implied.  See the License for the
018:         * specific language governing permissions and limitations
019:         * under the License.
020:         */
021:
022:        import org.apache.commons.lang.exception.NestableException;
023:
024:        /**
025:         * The base class of all exceptions thrown by Turbine.
026:         *
027:         * It is intended to ease the debugging by carrying on the information
028:         * about the exception which was caught and provoked throwing the
029:         * current exception. Catching and rethrowing may occur multiple
030:         * times, and provided that all exceptions except the first one
031:         * are descendands of <code>TurbineException</code>, when the
032:         * exception is finally printed out using any of the <code>
033:         * printStackTrace()</code> methods, the stacktrace will contain
034:         * the information about all exceptions thrown and caught on
035:         * the way.
036:         * <p> Running the following program
037:         * <p><blockquote><pre>
038:         *  1 import org.apache.turbine.util.TurbineException;
039:         *  2
040:         *  3 public class Test {
041:         *  4     public static void main( String[] args ) {
042:         *  5         try {
043:         *  6             a();
044:         *  7         } catch(Exception e) {
045:         *  8             e.printStackTrace();
046:         *  9         }
047:         * 10      }
048:         * 11
049:         * 12      public static void a() throws TurbineException {
050:         * 13          try {
051:         * 14              b();
052:         * 15          } catch(Exception e) {
053:         * 16              throw new TurbineException("foo", e);
054:         * 17          }
055:         * 18      }
056:         * 19
057:         * 20      public static void b() throws TurbineException {
058:         * 21          try {
059:         * 22              c();
060:         * 23          } catch(Exception e) {
061:         * 24              throw new TurbineException("bar", e);
062:         * 25          }
063:         * 26      }
064:         * 27
065:         * 28      public static void c() throws TurbineException {
066:         * 29          throw new Exception("baz");
067:         * 30      }
068:         * 31 }
069:         * </pre></blockquote>
070:         * <p>Yields the following stacktrace:
071:         * <p><blockquote><pre>
072:         * java.lang.Exception: baz: bar: foo
073:         *    at Test.c(Test.java:29)
074:         *    at Test.b(Test.java:22)
075:         * rethrown as TurbineException: bar
076:         *    at Test.b(Test.java:24)
077:         *    at Test.a(Test.java:14)
078:         * rethrown as TurbineException: foo
079:         *    at Test.a(Test.java:16)
080:         *    at Test.main(Test.java:6)
081:         * </pre></blockquote><br>
082:         *
083:         * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
084:         * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
085:         * @author <a href="mailto:quintonm@bellsouth.net">Quinton McCombs</a>
086:         * @version $Id: TurbineException.java 534527 2007-05-02 16:10:59Z tv $
087:         */
088:        public class TurbineException extends NestableException {
089:            /** Serial Version UID */
090:            private static final long serialVersionUID = -2978139489274739700L;
091:
092:            /**
093:             * Constructs a new <code>TurbineException</code> without specified
094:             * detail message.
095:             */
096:            public TurbineException() {
097:            }
098:
099:            /**
100:             * Constructs a new <code>TurbineException</code> with specified
101:             * detail message.
102:             *
103:             * @param msg The error message.
104:             */
105:            public TurbineException(String msg) {
106:                super (msg);
107:            }
108:
109:            /**
110:             * Constructs a new <code>TurbineException</code> with specified
111:             * nested <code>Throwable</code>.
112:             *
113:             * @param nested The exception or error that caused this exception
114:             *               to be thrown.
115:             */
116:            public TurbineException(Throwable nested) {
117:                super (nested);
118:            }
119:
120:            /**
121:             * Constructs a new <code>TurbineException</code> with specified
122:             * detail message and nested <code>Throwable</code>.
123:             *
124:             * @param msg    The error message.
125:             * @param nested The exception or error that caused this exception
126:             *               to be thrown.
127:             */
128:            public TurbineException(String msg, Throwable nested) {
129:                super(msg, nested);
130:            }
131:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.