I want to be able to rescue I18n::MissingTranslationData
like so:
begin
value = I18n.t('some.key.that.does.not.exist')
puts value
return value if value
rescue I18n::MissingTranslationData
puts "Kaboom!"
end
I tried the above, but it doesn't seem to go into the rescue block. I just see, on my console (because of puts
): translation missing: some.key.that.does.not.exist
. I never see Kaboom!
.
How do I get this to work?