Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 saxon 通过样式表转换一批 XLIFF 文件。我收到一些“转换失败:报告了运行时错误”消息。
我会假设所有这些错误都写入日志文件,但我找不到它。有什么提示吗?
谢谢你。
干杯,曼努埃尔
除非您对它进行任何更改,否则 Saxon 会将错误报告给标准 ErrorListener,后者将消息写入 System.err。如果您从进入控制台的命令行运行;如果您正在运行一个 GUI 应用程序,它很可能会消失得无影无踪。将消息重定向到其他地方的最简单方法是在 Transformer / XsltTransformer 对象上设置 ErrorListener。