I just released an eBook about exceptions and failure handling in Ruby
exceptionalruby.com
exceptionalruby.com
avdi: let me know if you'd like any help packing a .mobi, I'm working on a quick-tutorial post.
You'll also get a .mobi version simultaneously.
P.S. Would you mind getting in touch with me? I have a script to share with you guys.
You must add constraints to the database and handle the resulting exceptions to ensure unique values.
They really need to kill validate_uniqueness since it is so totally broken
It's the little things.
Is there an actual difference between these methods?
"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better." - Samuel Beckett
try:
your code
except:
handle the exception
finally:
clean up;-)