lib/roadie/errors.rb in roadie-3.5.1 vs lib/roadie/errors.rb in roadie-4.0.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Roadie
# Base class for all Roadie errors. Rescue this if you want to catch errors
# from Roadie.
#
# If Roadie raises an error that does not inherit this class, please report
@@ -56,11 +58,11 @@
private
# Redundant method argument is to keep API compatability without major version bump.
# TODO: Remove argument on version 4.0.
def build_message(extra_message = @extra_message)
- message = %(Could not find stylesheet "#{css_name}")
+ message = +%(Could not find stylesheet "#{css_name}")
message << ": #{extra_message}" if extra_message
message << "\nUsed provider:\n#{provider}" if provider
message
end
end
@@ -73,10 +75,10 @@
super(css_name, "All providers failed", provider_list)
end
private
def build_message(extra_message)
- message = %(Could not find stylesheet "#{css_name}": #{extra_message}\nUsed providers:\n)
+ message = +%(Could not find stylesheet "#{css_name}": #{extra_message}\nUsed providers:\n)
each_error_row(errors) do |row|
message << "\t" << row << "\n"
end
message
end