public class SAXException extends 异常
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.
这个类可以包含XML解析器或应用程序中的基本错误或警告信息:解析器的作者或应用程序作者可以子类提供额外的功能。SAX处理程序可能会抛出该异常或任何异常子类从。
如果应用程序需要通过其他类型的异常,它必须把这些例外在saxexception或来自一个saxexception例外。
如果解析器或应用程序需要包含在XML文档中的特定位置的信息,它应该使用SAXParseException
类。
SAXParseException
,
Serialized Form
Constructor and Description |
---|
SAXException()
创建一个新的saxexception。
|
SAXException(异常 e)
创建一个新的saxexception包装现有的例外情况。
|
SAXException(String message)
创建一个新的saxexception。
|
SAXException(String message, 异常 e)
从现有的异常创建一个新的saxexception。
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause()
返回异常的原因
|
异常 |
getException()
返回嵌入式异常,如果有。
|
String |
getMessage()
返回这个异常的详细信息。
|
String |
toString()
重写toString拿起任何嵌入式例外。
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public SAXException()
public SAXException(String message)
message
-错误或警告消息。
public SAXException(异常 e)
现有的异常将被嵌入在新的,其信息将成为该saxexception默认的消息。
e
-被包裹在一个saxexception例外。
public String getMessage()
如果有一个嵌入式的例外,如果saxexception没有自己的详细信息,这种方法将从嵌入式异常返回的详细信息。
getMessage
方法重写,继承类
Throwable
public 异常 getException()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.