Ruby exception handling

begin
result = risky_operation
rescue StandardError => e
puts "Risky operation FAILED: #{e}"
end

Comments

Popular posts from this blog

Enabling password authentication for new ec2 box | ssh, ssh config, EC2 setup, new user in EC2, PasswordAuthentication

Rails Memcache issues

Ruby on Rails 3.x Skip callback and validation and reset Callback | Ruby on Rails, Skip callback, validation, reset Callback