📄 turbineexception.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:10 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class TurbineException</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TurbineException.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../org/apache/turbine/util/TurbineRuntimeException.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="TurbineException.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.util</FONT><BR>Class TurbineException</H2><PRE>java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--<B>org.apache.turbine.util.TurbineException</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/turbine/services/InitializationException.html">InitializationException</A>, <A HREF="../../../../org/apache/turbine/util/security/TurbineSecurityException.html">TurbineSecurityException</A></DD></DL><HR><DL><DT>public class <B>TurbineException</B><DT>extends java.lang.Exception</DL><P>The base class of all exceptions thrown by Turbine. It is intended to ease the debugging by carrying on the information about the exception which was caught and provoked throwing the current exception. Catching and rethrowing may occur multiple times, and provided that all exceptions except the first one are descendands of <code>TurbineException</code>, when the exception is finally printed out using any of the <code> printStackTrace()</code> methods, the stacktrace will contain the information about all exceptions thrown and caught on the way. <p> Running the following program <p><blockquote><pre> 1 import org.apache.turbine.util.TurbineException; 2 3 public class Test { 4 public static void main( String[] args ) { 5 try { 6 a(); 7 } catch(Exception e) { 8 e.printStackTrace(); 9 } 10 } 11 12 public static void a() throws Exception { 13 try { 14 b(); 15 } catch(Exception e) { 16 throw new TurbineException("foo", e); 17 } 18 } 19 20 public static void b() throws Exception { 21 try { 22 c(); 23 } catch(Exception e) { 24 throw new TurbineException("bar", e); 25 } 26 } 27 28 public static void c() throws Exception { 29 throw new Exception("baz"); 30 } 31 } </pre></blockquote> <p>Yields the following stacktrace: <p><blockquote><pre> java.lang.Exception: baz: bar: foo at Test.c(Test.java:29) at Test.b(Test.java:22) rethrown as TurbineException: bar at Test.b(Test.java:24) at Test.a(Test.java:14) rethrown as TurbineException: foo at Test.a(Test.java:16) at Test.main(Test.java:6) </pre></blockquote><br><P><DL><DT><B>Author: </B><DD><a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a></DD><DT><B>See Also: </B><DD><A HREF="../../../../serialized-form.html#org.apache.turbine.util.TurbineException">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/turbine/util/TurbineException.html#TurbineException()">TurbineException</A></B>()</CODE><BR> Constructs a new <code>TurbineException</code> without specified detail message.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/turbine/util/TurbineException.html#TurbineException(java.lang.String)">TurbineException</A></B>(java.lang.String msg)</CODE><BR> Constructs a new <code>TurbineException</code> with specified detail message.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/turbine/util/TurbineException.html#TurbineException(java.lang.String, java.lang.Throwable)">TurbineException</A></B>(java.lang.String msg, java.lang.Throwable nested)</CODE><BR> Constructs a new <code>TurbineException</code> with specified detail message and nested <code>Throwable</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/turbine/util/TurbineException.html#TurbineException(java.lang.Throwable)">TurbineException</A></B>(java.lang.Throwable nested)</CODE><BR> Constructs a new <code>TurbineException</code> with specified nested <code>Throwable</code>.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/turbine/util/TurbineException.html#getMessage()">getMessage</A></B>()</CODE><BR> Returns the error message of this and any nested <code>Throwable</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/turbine/util/TurbineException.html#printStackTrace()">printStackTrace</A></B>()</CODE><BR> Prints the stack trace of this exception the the standar error stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/turbine/util/TurbineException.html#printStackTrace(java.io.PrintStream)">printStackTrace</A></B>(java.io.PrintStream out)</CODE><BR> Prints the stack trace of this exception to the specified print stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -