lib/rest_model/serialization/integer.rb in rest_model-0.1.6 vs lib/rest_model/serialization/integer.rb in rest_model-0.1.7
- old
+ new
@@ -2,16 +2,16 @@
module Serialization
class Integer
def self.serialize(value)
Integer(value)
rescue ArgumentError
- raise "value not serializable: #{value}"
+ raise SerializationError, "value '#{value}' is not an integer"
end
def self.desserialize(value)
Integer(value)
rescue ArgumentError
- raise "value not desserializable: #{value}"
+ raise SerializationError, "value '#{value}' is not an integer"
end
end
end
end