From 59c8d43d94aa782848bf00f000512a04fca7c069 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 20 Feb 2023 05:01:20 -0500 Subject: Autofix Rubocop Style/RescueStandardError (#23745) --- lib/mastodon/domains_cli.rb | 2 +- lib/tasks/mastodon.rake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb index 41ea5b152..05f08f462 100644 --- a/lib/mastodon/domains_cli.rb +++ b/lib/mastodon/domains_cli.rb @@ -165,7 +165,7 @@ module Mastodon stats[domain]['activity'] = Oj.load(res.to_s) end - rescue StandardError + rescue failed.increment ensure processed.increment diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index f919ba989..0a3946ac7 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -92,7 +92,7 @@ namespace :mastodon do prompt.ok 'Database configuration works! 🎆' db_connection_works = true break - rescue StandardError => e + rescue => e prompt.error 'Database connection could not be established with this configuration, try again.' prompt.error e.message break unless prompt.yes?('Try again?') @@ -132,7 +132,7 @@ namespace :mastodon do redis.ping prompt.ok 'Redis configuration works! 🎆' break - rescue StandardError => e + rescue => e prompt.error 'Redis connection could not be established with this configuration, try again.' prompt.error e.message break unless prompt.yes?('Try again?') @@ -417,7 +417,7 @@ namespace :mastodon do mail = ActionMailer::Base.new.mail to: send_to, subject: 'Test', body: 'Mastodon SMTP configuration works!' mail.deliver break - rescue StandardError => e + rescue => e prompt.error 'E-mail could not be sent with this configuration, try again.' prompt.error e.message break unless prompt.yes?('Try again?') -- cgit