lib/influxer/metrics/scoping/current_scope.rb in influxer-1.1.6 vs lib/influxer/metrics/scoping/current_scope.rb in influxer-1.2.0
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require 'active_support/per_thread_registry'
+require "active_support/per_thread_registry"
module Influxer
module Scoping
module CurrentScope # :nodoc:
# Clone of current_scope methods for newer versions of ActiveModel
@@ -37,9 +37,10 @@
private
def raise_invalid_scope_type!(scope_type)
return if VALID_SCOPE_TYPES.include?(scope_type)
+
raise ArgumentError, "Invalid scope type '#{scope_type}' sent to the registry. \
Scope types must be included in VALID_SCOPE_TYPES"
end
end
end