2

我继承了一个每天作为计划任务运行的程序,它需要一个 400 多页的 PDF 患者数据报告,并将其拆分为各个患者帐户。然后,一旦它被拆分,它会将每个文件排队以上传到文件存储库中。

通常,它完全无需任何人工交互即可运行,但今天它开始在 PDF 拆分的页面上崩溃,在本例中为 pg 91-92。所以我从主 PDF 中完全提取并删除了这两个页面。重新运行程序,它在第 87-88 页比以前更早地崩溃了。

我在这里很困惑。

这是错误:

Unhandled Exception: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length 
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolen fAlwaysCopy)
at System.String.Substring(Int32 startIndex, Int32 length)
at _24HrSumm.Program.validRoom(String strRoom)
at _24HrSumm.Program.Main(String[] args)

我完全不会与程序员混淆,我一直在查看 PDF 本身,试图根据我在 Visual Studio 中阅读的代码来查看挂起这个程序的内容,但我找不到无效的房间号,我认为这会使程序崩溃。我只是完全关闭了吗?

感谢您的阅读以及任何想法或帮助!

4

0 回答 0