异常处理

pay_subject
daiao 5 years ago
parent 05f8538ca0
commit 8e847f181b

@ -24,7 +24,7 @@ module ControllerRescueHandler
rescue_from ActiveRecord::RecordInvalid do |ex| rescue_from ActiveRecord::RecordInvalid do |ex|
render_error(ex.record.errors.full_messages.join(',')) render_error(ex.record.errors.full_messages.join(','))
end end
rescue_from StandardError do |ex| rescue_from RuntimeError do |ex|
render_error(ex.message) render_error(ex.message)
end end
end end

Loading…
Cancel
Save