Avoid swallowing exceptions unnecessarily.
This commit is contained in:
@@ -10,9 +10,6 @@ module Admin
|
||||
@importer.process!
|
||||
flash[:notice] = "Import queued"
|
||||
redirect_to new_admin_alias_and_implication_import_path
|
||||
rescue => x
|
||||
flash[:notice] = x.to_s
|
||||
redirect_to new_admin_alias_and_implication_import_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class CountsController < ApplicationController
|
||||
respond_to :xml, :json
|
||||
rescue_from Post::TimeoutError, with: :rescue_exception
|
||||
|
||||
def posts
|
||||
@count = Post.fast_count(
|
||||
|
||||
@@ -39,8 +39,6 @@ module Moderator
|
||||
def expunge
|
||||
@post = ::Post.find(params[:id])
|
||||
@post.expunge!
|
||||
rescue StandardError => x
|
||||
@error = x
|
||||
end
|
||||
|
||||
def confirm_ban
|
||||
|
||||
@@ -51,6 +51,7 @@ class UserUpgradesController < ApplicationController
|
||||
@user.promote_to!(level, is_upgrade: true)
|
||||
flash[:success] = true
|
||||
rescue Stripe::CardError => e
|
||||
DanbooruLogger.log(e)
|
||||
flash[:error] = e.message
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user