ActiveSupport::Rescuable

module ActiveSupport::Rescuable

Rescuable module adds support for easier exception handling.

Public Instance Methods

rescue_with_handler(exception) Show source

Delegates to the class method, but uses the instance as the subject for rescue_from handlers (method calls, instance_exec blocks).

# File activesupport/lib/active_support/rescuable.rb, line 157
def rescue_with_handler(exception)
  self.class.rescue_with_handler exception, object: self
end

© 2004–2017 David Heinemeier Hansson
Licensed under the MIT License.

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部