2016/08/31
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
2016/08/31
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