Top "Rescue" questions

The Ruby keyword for catching exceptions.

Using transaction in Ruby On Rails controller method

I love Ruby On Rails and every day I am learning and improving my skills. Currently I am working on …

ruby-on-rails ruby transactions controller rescue
What is the clearest way to open a file and do "rescue" when it cannot be opened in Ruby

I am now dealing with this issue by using the following code begin File.open(filename, 'r') rescue print "failed …

ruby rescue
Ruby rescue syntax error

I have the following line of code that is giving me an error: rescue Timeout::Error => e logs.puts("…

ruby api syntax-error rescue
ActiveRecord exceptions not rescued

I have the following code block: unless User.exist?(...) begin user = User.new(...) # Set more attributes of user user.save! …

ruby-on-rails exception activerecord exception-handling rescue
General rescue throughout controller when id not found - RoR

I have stumbled upon a situation where my application looks for an id that does not exist in the database. …

ruby-on-rails exception activerecord rescue