зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-03 09:46:17 +03:00
rescue_from feature
Этот коммит содержится в:
20
lib/telegram/bot/updates_controller/rescue.rb
Обычный файл
20
lib/telegram/bot/updates_controller/rescue.rb
Обычный файл
@@ -0,0 +1,20 @@
|
||||
require 'active_support/rescuable'
|
||||
|
||||
module Telegram
|
||||
module Bot
|
||||
class UpdatesController
|
||||
module Rescue
|
||||
extend ActiveSupport::Concern
|
||||
include ActiveSupport::Rescuable
|
||||
|
||||
private
|
||||
|
||||
def process_action(*)
|
||||
super
|
||||
rescue Exception => exception # rubocop:disable RescueException
|
||||
rescue_with_handler(exception) || raise
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Ссылка в новой задаче
Block a user