error.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 314 行 · 第 1/2 页

HTML
314
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_03) on Wed Nov 02 09:48:22 CST 2005 --><META http-equiv="Content-Type" content="text/html; charset=gb2312"><TITLE>Error (Java 2 Platform SE 5.0)</TITLE><META NAME="keywords" CONTENT="java.lang.Error class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="Error (Java 2 Platform SE 5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="跳过导航链接"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Error.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="EnumConstantNotPresentException.html" title="java.lang 中的类"><B>上一个类</B></A>&nbsp;&nbsp;<A HREF="Exception.html" title="java.lang 中的类"><B>下一个类</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html@java_2Flang_2FError.html" target="_top"><B>框架</B></A>  &nbsp;&nbsp;<A HREF="Error.html" target="_top"><B>无框架</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>所有类</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../allclasses-noframe.html"><B>所有类</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  摘要:&nbsp;嵌套&nbsp;|&nbsp;字段&nbsp;|&nbsp;<A HREF="#constructor_summary">构造方法</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Throwable">方法</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">详细信息:&nbsp;字段&nbsp;|&nbsp;<A HREF="#constructor_detail">构造方法</A>&nbsp;|&nbsp;方法</FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.lang</FONT><BR>类 Error</H2><PRE><A HREF="Object.html" title="java.lang 中的类">java.lang.Object</A>  <IMG SRC="../../resources/inherit.gif" ALT="继承者 "><A HREF="Throwable.html" title="java.lang 中的类">java.lang.Throwable</A>      <IMG SRC="../../resources/inherit.gif" ALT="继承者 "><B>java.lang.Error</B></PRE><DL><DT><B>所有已实现的接口:</B> <DD>java.io.Serializable</DD></DL><DL><DT><B>直接已知子类:</B> <DD><A HREF="annotation/AnnotationFormatError.html" title="java.lang.annotation 中的类">AnnotationFormatError</A>, <A HREF="AssertionError.html" title="java.lang 中的类">AssertionError</A>, <A HREF="LinkageError.html" title="java.lang 中的类">LinkageError</A>, <A HREF="ThreadDeath.html" title="java.lang 中的类">ThreadDeath</A>, <A HREF="VirtualMachineError.html" title="java.lang 中的类">VirtualMachineError</A></DD></DL><HR><DL><DT><PRE>public class <B>Error</B><DT>extends <A HREF="Throwable.html" title="java.lang 中的类">Throwable</A></DL></PRE><P><code>Error</code> 是 <code>Throwable</code> 的子类,用于指示合理的应用程序不应该试图捕获的严重问题。大多数这样的错误都是异常条件。虽然 <code>ThreadDeath</code> 错误是一个&ldquo;正规&rdquo;的条件,但它也是 <code>Error</code> 的子类,因为大多数应用程序都不应该试图捕获它。  <p>在执行该方法期间,无需在其 <code>throws</code> 子句中声明可能抛出但是未能捕获的 <code>Error</code> 的任何子类,因为这些错误可能是再也不会发生的异常条件。<P><P><DL><DT><B>从以下版本开始:</B></DT>  <DD>JDK1.0</DD><DT><B>另请参见:</B><DD><A HREF="ThreadDeath.html" title="java.lang 中的类"><CODE>ThreadDeath</CODE></A>, <A HREF="../../serialized-form.html#java.lang.Error">序列化表格</A></DL><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>构造方法摘要</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="Error.html#Error()">Error</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造详细消息为 <code>null</code> 的新错误。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="Error.html#Error(java.lang.String)">Error</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;message)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造带指定详细消息的新错误。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="Error.html#Error(java.lang.String, java.lang.Throwable)">Error</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;message,      <A HREF="Throwable.html" title="java.lang 中的类">Throwable</A>&nbsp;cause)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造带指定详细消息和原因的新错误。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="Error.html#Error(java.lang.Throwable)">Error</A></B>(<A HREF="Throwable.html" title="java.lang 中的类">Throwable</A>&nbsp;cause)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;根据指定的原因和 <tt>(cause==null &#063; null :cause.toString())</tt> 的详细消息来构造新的错误(通常包含 <tt>cause</tt> 的类和详细消息)。</TD></TR></TABLE>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?