什么时候 DocumentException
(iText)发生?我想把我的代码记录下来,我想在我的代码后面添加一些解释。@throws DocumentException
标签。我在API中没有找到任何东西。
当文档没有打开(已经关闭,或者还没有打开)。
在反编译的源代码中,我发现了这几行。
if (this.close) {
throw new DocumentException("the document has been closed you cant add any elements");
} else if (!this.open) {
throw new DocumentException("the document is not open yet you can only add meta information");
}