Add and apply Naming/RescuedExceptionsVariableName rubocop rule
This rule was introduced in RuboCop 0.67.2, but now after seeing a fix in version 1.65.1, we have decided to add it. The reason for adding it is to ensure consistency in how we reference exceptions throughout the project, by following a standard naming convention for exception variables.
This commit is contained in:
@@ -337,6 +337,9 @@ Naming/BlockForwarding:
|
|||||||
- "app/controllers/management/base_controller.rb"
|
- "app/controllers/management/base_controller.rb"
|
||||||
- "app/controllers/subscriptions_controller.rb"
|
- "app/controllers/subscriptions_controller.rb"
|
||||||
|
|
||||||
|
Naming/RescuedExceptionsVariableName:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Naming/VariableName:
|
Naming/VariableName:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ class MachineLearning
|
|||||||
|
|
||||||
job.update!(finished_at: Time.current)
|
job.update!(finished_at: Time.current)
|
||||||
Mailer.machine_learning_success(user).deliver_later
|
Mailer.machine_learning_success(user).deliver_later
|
||||||
rescue Exception => error
|
rescue Exception => e
|
||||||
handle_error(error)
|
handle_error(e)
|
||||||
raise error
|
raise e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
handle_asynchronously :run, queue: "machine_learning"
|
handle_asynchronously :run, queue: "machine_learning"
|
||||||
|
|||||||
Reference in New Issue
Block a user