user@domain.invalid
12/7/2006 12:09:00 PM
Hello, I've seen there is a retry statement that rerun the entire
begin/end block which raised the exception...
I wonder if there is a way to 'continue' (from the rescue block) with
the next statement following the one which raised the exception.
Eg :
begin
File.delete("#{@fichier_destination_sql}.gz") # sql
File.delete("#{@fichier_destination_tar}.tgz") # tar
File.delete("/tmp/aboulafia-db-testdb_rbackup-uid1.gz")
File.delete("/tmp/aboulafia-rep-ror_anaema-uid1.tgz")
rescue
end
I want to avoid FileTest.
If a file does not exists, the others will not be deleted which is not
what I want.
I would like
begin
# snip
rescue
continue
end
Is there a solution ? Or a common pattern to avoid this situation ?
Thanks !