Answers for "exception ruby"

0

ruby rase exception

raise StandardError.new "This is an exception"
Posted by: Guest on January-04-2021
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

ruby raise error

raise Exception.new "This is an exception"
Posted by: Guest on June-11-2021

Browse Popular Code Answers by Language