public interface DOMError
DOMError是一个接口,描述了一个错误。
| Modifier and Type | Field and Description |
|---|---|
static short |
SEVERITY_ERROR
这个错误的严重程度
DOMError描述是错误的。
|
static short |
SEVERITY_FATAL_ERROR
这个错误的
DOMError描述的严重程度是致命的错误。
|
static short |
SEVERITY_WARNING
错误的
DOMError描述的严重警告。
|
| Modifier and Type | Method and Description |
|---|---|
DOMLocator |
getLocation()
误差的位置。
|
String |
getMessage()
描述发生的错误的实现特定的字符串。
|
Object |
getRelatedData()
相关
DOMError.type相关数据如。
|
Object |
getRelatedException()
相关平台依赖异常如果有。
|
short |
getSeverity()
的错误,要么
SEVERITY_WARNING程度,
SEVERITY_ERROR,或
SEVERITY_FATAL_ERROR。
|
String |
getType()
一个
DOMString指示相关数据预计在
relatedData。
|
static final short SEVERITY_WARNING
DOMError描述的严重警告。一个
SEVERITY_WARNING不会造成处理停止,除非
DOMErrorHandler.handleError()返回
false。
static final short SEVERITY_ERROR
DOMError描述是错误的。一个
SEVERITY_ERROR可能不会导致处理,如果错误可以恢复停止,除非
DOMErrorHandler.handleError()返回
false。
static final short SEVERITY_FATAL_ERROR
DOMError描述的严重程度是致命的错误。一个
SEVERITY_FATAL_ERROR会导致正常的处理停止。除非实现选择继续忽视是
DOMErrorHandler.handleError()返回值,在这种情况下,行为变得不确定。
short getSeverity()
SEVERITY_WARNING程度,
SEVERITY_ERROR,或
SEVERITY_FATAL_ERROR。
String getMessage()
String getType()
DOMString指示相关数据预计在
relatedData。用户应根据误差为规范如有发现其
DOMString型和
relatedData定义。
注:为例,Document.normalizeDocument()并产生警告当“拆分CDATA节”参数使用。因此,该方法生成的SEVERITY_WARNING与type "cdata-sections-splitted"和第一CDATASection节点的文档顺序从分裂造成的relatedData属性返回。
Object getRelatedException()
Object getRelatedData()
DOMError.type相关数据如。
DOMLocator getLocation()
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.