THIS ___ IS ___ SPARTA !!!
Working in conjunction with my coworker Rod, we came up with a name for code like this:
begin ... rescue ActiveRecord::RecordInvalid => error end
We're calling it 'THIS IS SPARTA!' code, as in the scene from the movie 300 where the king of Sparta kicks the Persian messenger into the archetypal infinitely deep black pit/hole thing. Obviously, this is the name because that is exactly what happens to the exception in this case.
Please avoid writing 'THIS IS SPARTA!' code.
Other movies with the "archetypal infinitely deep black pit/hole thing" scene:
- National Treasure
- Pee Wees Big Adventure (Rod knew this one, not me)
- Bill and Ted's Bogus Journey (again, credit to Rod)
- Star Wars (Boba Fett falling into the Sarlacc pit)



