Rails pdftk 错误
我在 Rails 应用程序中使用 pdftk 来生成多个单独 pdf 文件的复合 pdf。无论出于何种原因,当 pdftk 未生成复合文件时,不会生成错误。我确实将此代码区域封装在 begin/rescue 块中,但由于我使用 %x[...] 执行 pdftk,因此它不会收到来自外部调用的任何异常。我怎样才能 a) 调用 pdftk 来捕获异常或 b) 从 %x 调用接收输出错误代码?
I'm using pdftk within my rails application to generate a composite pdf of several individual pdf files. When, for whatever reason, pdftk does not generate the composite file, no error is generated. I do have this area of code wrapped in a begin/rescue block, but since i'm using %x[...] to execute pdftk, it doesn't receive any exeptions from the external call. How can i either a) call pdftk where i can capture the exception or b) receive the output error code from the %x call?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)