By default Rake will stop at the first exception raised.
There doesn't seem to be a command line equivalent to make -k, is there any way to do it programmaticaly?
Unfortunately there is no --keep-going
in rake
(and I think that's fine). The only way I can think of is to wrap your Rakefile with begin; rescue; end
, but it won't make it "keep going" -- it will simply ensure that your rake
's execution return is 0
.
begin
# Former Rakefile code goes here
rescue
puts $!.inspect
end
I believe that "keep going" isn't possible since when you raise
something you already changed your algorithm's flow -- i.e. don't try to solve your problem by ignoring Exceptions.