开发者

Rails pdftk error

开发者 https://www.devze.com 2023-02-07 00:34 出处:网络
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 erro

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

精彩评论

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

关注公众号