🤓 danott.co

Today I Learned

Today I needed to re-raise an error in ruby, but change the error message slightly. It turns out this is baked right in to the use of raise!

do
  # something that raises
rescue => e
  raise e, "This is my modified message"
end

The docs!