本文整理汇总了Java中org.w3c.dom.DOMError.getRelatedException方法的典型用法代码示例。如果您正苦于以下问题:Java DOMError.getRelatedException方法的具体用法?Java DOMError.getRelatedException怎么用?Java DOMError.getRelatedException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.w3c.dom.DOMError
的用法示例。
在下文中一共展示了DOMError.getRelatedException方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleError
import org.w3c.dom.DOMError; //导入方法依赖的package包/类
public boolean handleError(DOMError error) {
String from = schemaResource != null ? schemaResource : "string";
log.warn("DOM error reported loading schema from " + from + ":\n" +
" message: " + error.getMessage() + "\n" +
" type: " + error.getType() + "\n" +
" related data: " + error.getRelatedData() + "\n" +
" related exception: " + error.getRelatedException() + "\n" +
" severity: " + error.getSeverity() + "\n" +
" location: " + error.getLocation());
if (error.getRelatedException() instanceof Throwable) {
Throwable t = (Throwable) error.getRelatedException();
log.warn("DOM error related exception: " + t.getMessage(), t);
}
return false;
}
示例2: DOMErrorImpl
import org.w3c.dom.DOMError; //导入方法依赖的package包/类
/**
* Public constructor
*
*/
public DOMErrorImpl(DOMError src) {
this.severity = src.getSeverity();
this.message = src.getMessage();
this.type = src.getType();
this.relatedException = src.getRelatedException();
this.relatedData = src.getRelatedData();
this.location = new DOMLocatorImpl(src.getLocation());
}