lib/rest_model/key/property/sender.rb in rest_model-0.1.6 vs lib/rest_model/key/property/sender.rb in rest_model-0.1.7
- old
+ new
@@ -3,10 +3,10 @@
module Sender
def to_source!(value, resource, options = {})
source_value = begin
translation.translates_to_source? ? translation.translate_to_source(value, resource)
: serializer.desserialize(value)
- rescue => exception
+ rescue TranslationError, SerializationError
raise exception if options[:fail]
end
source = {}
path = source_path