Check out example codes for "ruby catch all exceptions". It will help you in understanding the concepts better.

Code Example 1

begin
  raise 'This exception will be rescued!'
rescue StandardError => e
  puts "Rescued: #{e.inspect}"
end

Learn ReactJs, React Native from akashmittal.com