Class SaxParseException

All Implemented Interfaces:
Serializable

public class SaxParseException extends XmlParseException
SAX Parse Exception - Exception thrown during SAX parsing SAX 解析异常 - SAX 解析期间抛出的异常

Features | 主要功能:

  • SAX-specific parse exception with line/column info - 带行/列信息的 SAX 特定解析异常
  • Wraps org.xml.sax.SAXParseException - 包装 org.xml.sax.SAXParseException

Usage Examples | 使用示例:

// Catch SAX parse exception
try {
    SaxParser.createSecure().parse(xml);
} catch (SaxParseException e) {
    System.err.println("Error at line " + e.getLine());
}

Security | 安全性:

  • Thread-safe: Yes (immutable exception) - 线程安全: 是(不可变异常)
  • Null-safe: No (message must not be null) - 空值安全: 否(消息不能为 null)
Since:
JDK 25, opencode-base-xml V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Constructor Details

    • SaxParseException

      public SaxParseException(String message, int line, int column)
    • SaxParseException

      public SaxParseException(String message, int line, int column, Throwable cause)
    • SaxParseException

      public SaxParseException(SAXParseException e)