public static String getMyMessageAndLocation(TransformerException exception) {
SourceLocator locator = exception.getLocator();
StringBuilder msg = new StringBuilder();
if (locator != null) {
String systemID = locator.getSystemId();
int line = locator.getLineNumber();
int col = locator.getColumnNumber();
if (systemID != null) {
msg.append("SystemID: ");
msg.append(systemID);
}
if (line != 0) {
msg.append(" [");
msg.append(line);
if (col != 0) {
msg.append(',');
msg.append(col);
}
msg.append("]");
}
}
msg.append(": ");
msg.append(exception.getMessage());
return msg.toString();
}
MCRErrorListener.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:mycore
作者:
评论列表
文章目录