- From: John Merrells <
>
- To:
- Subject: [chef] Re: Re: Re: Re: chef-client & exceptions
- Date: Thu, 15 Apr 2010 09:49:27 -0700
On Apr 15, 2010, at 9:43 AM, John Merrells wrote:
>
> Ah... that catches exceptions when the chef-client dies, but actually I
>
> want to
>
> catch the exceptions from the recipe. It looks like the chef-client
>
> catches those
>
> and reports them. Is there an easy way to wrap all the recipes with
>
> toadhopper?
>
>
Mmm... I take that back... I think I must have messed this up somehow...
>
I'll work
>
on it some more....
I take back my take back...
chef-0.8.8/lib/chef/application.rb
def fatal!(msg, err = -1)
STDERR.puts("FATAL: #{msg}")
Chef::Log.fatal(msg)
Process.exit err
end
so the exception is eaten and the process exits... so it won't come out of
run for toadhopper to send on.
Probably Applciation.fatal! and exit! shoudl be passed the exception, which
they can pass to hoptoad, if it's configured....
John
--
John Merrells
http://johnmerrells.com
+1.415.244.5808
Archive powered by MHonArc 2.6.16.