开发者

Rails pdftk error

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?


`pdftk #{subcommand}`
raise Exception unless $?.success?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜