lib/wash_out/param.rb in wash_out-0.6.0 vs lib/wash_out/param.rb in wash_out-0.6.1
- old
+ new
@@ -68,17 +68,21 @@
when 'datetime'; :to_datetime
when 'time'; :to_time
else raise RuntimeError, "Invalid WashOut simple type: #{type}"
end
- if operation.nil? || data.nil?
- data
- elsif @multiplied
- data.map{|x| x.send(operation)}
- elsif operation.is_a? Symbol
- data.send(operation)
- else
- operation.call(data)
+ begin
+ if operation.nil? || data.nil?
+ data
+ elsif @multiplied
+ data.map{|x| x.send(operation)}
+ elsif operation.is_a? Symbol
+ data.send(operation)
+ else
+ operation.call(data)
+ end
+ rescue
+ raise WashOut::Dispatcher::SOAPError, "Invalid SOAP parameter '#{key}' format"
end
end
end
# Checks if this Param defines a complex type.