Answers for "what does the rescue keyword mean in ruby on rails"

0

ruby catch all exceptions

begin
  raise 'This exception will be rescued!'
rescue StandardError => e
  puts "Rescued: #{e.inspect}"
end
Posted by: Guest on June-29-2020
0

rails begin rescue

begin
  3 + '4'
rescue => e
  puts e.class
  puts e.message
  puts e.trace
end
Posted by: Guest on August-18-2020

Code answers related to "what does the rescue keyword mean in ruby on rails"

Browse Popular Code Answers by Language