Answers for "Can I check exception in ruby using If condition?"

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

Code answers related to "Can I check exception in ruby using If condition?"

Browse Popular Code Answers by Language