LastException
PdfFileEditor.LastException property
获取最后发生的异常。可用于检查失败原因。
public Exception LastException { get; }
例子
PdfFileEditor pfe = new PdfFileEditor();
if (!pfe.TryConcatenate("file1.pdf", "file2.pdf", "file3.pdf"))
{
Console.WriteLine("Error occured:");
if (pfe.LastException != null)
{
Console.WriteLine(pfe.LastException.Message);
if (pfe.LastException.InnerException != null)
Console.WriteLine(pfe.LastException.InnerException.Message);
}
}
也可以看看
- class PdfFileEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF