title: Rails: Catch all exceptions in a rails controller
body: <p>Is there a way to catch all uncatched exceptions in a rails controller, like this:</p>
  
  <pre><code>def delete
    schedule_id = params[:scheduleId]
    begin
      Schedules.delete(schedule_id)
    rescue ActiveRecord::RecordNotFound
      render :json => "record not found"
    rescue ActiveRecord::CatchAll
      #Only comes in here if nothing else catches the error
    end
    render :json => "ok"
  end</code></pre>
  
  <p>Thank you</p>