有人可以解釋catch_exceptions中的代碼嗎?ruby on rails 3 question
我很難理解。
感謝
class ApplicationController < ActionController::Base
around_filter :catch_exceptions
private
def catch_exceptions
yield
rescue => exception
logger.debug "Caught exception! #{exception}"
raise
end
end