lib/table_sync/errors.rb in table_sync-1.10.0 vs lib/table_sync/errors.rb in table_sync-1.11.0
- old
+ new
@@ -14,17 +14,28 @@
default_values: #{default_values.inspect}
MSG
end
end
+ class UndefinedConfig < Error
+ def initialize(model)
+ super("Config not defined for model; model: #{model.inspect}")
+ end
+ end
+
class DestroyError < Error
def initialize(data)
super("Destroy has changed more than 1 row; data: #{data.inspect}")
end
end
- class UndefinedConfig < Error
- def initialize(model)
- super("Config not defined for model; model: #{model.inspect}")
+ class UnprovidedEventTargetKeysError < Error
+ # @param target_keys [Array<Symbol,String>]
+ # @param target_attributes [Hash<Symbol|String,Any>]
+ def initialize(target_keys, target_attributes)
+ super(<<~MSG.squish)
+ Some target keys not found in received attributes!
+ (Expects: #{target_keys}, Actual: #{target_attributes.keys})
+ MSG
end
end
end