I am still learning Rake.
Does Rake has built in support to handle task's error like MSBuild of NANT: if this task failed; execute anoter tasks (rolling back, etc.)
e.g.: in MSBuild they have OnError
element
<OnError ExecuteTargets="RollBackDatabase" />
Thanks for your help
Found out the answer:
just use normal exception handling block
task :will_fail_task do
begin
raise "something's wrong here"
rescue
rollback()
raise "error executing task"
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With