- From: Peter Loron <
>
- To:
- Subject: [chef] Handle errors raised in ruby blocks?
- Date: Thu, 28 Mar 2013 15:08:15 -0700
I have some ruby blocks in a cookbook I'm working on. What is the proper way
to raise/handle issues when something goes wrong in one of the blocks?
For example, in one block I'm using FileUtils.copy_file to copy a large zip
archive from a server to the node running the recipe. When the file source
doesn't exist, the failure is silent and the recipe just keeps on trucking.
I'm wrapping the command in a begin/rescue block and calling
'Chef::Application.fatal!', but no dice.
Can somebody provide the clue stick?
Thanks.
-Pete
- [chef] Handle errors raised in ruby blocks?, Peter Loron, 03/28/2013
Archive powered by MHonArc 2.6.16.