模块 java.xml

接口 XMLReporter


public interface XMLReporter
该接口用于报告非致命错误。只有警告应该通过这个接口回显。
自从:
1.6
  • 方法总结

    修饰符和类型
    方法
    描述
    void
    report(String message, String errorType, Object relatedInformation, Location location)
    以特定于应用程序的格式报告所需的消息。
  • 方法详情

    • report

      void report(String  message, String  errorType, Object  relatedInformation, Location  location) throws XMLStreamException
      以特定于应用程序的格式报告所需的消息。只有警告和非致命错误应该通过此接口报告。致命错误应作为 XMLStreamException 抛出。
      参数:
      message - 错误信息
      errorType - 一个实现定义的错误类型
      relatedInformation - 与错误相关的信息(如果有)
      location - 错误的位置,如果可用
      抛出:
      XMLStreamException - 如果发生错误